blob: 936103657f31fd11e28fcc47724a0af312a42aff [file] [log] [blame]
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +00001/* 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
10/* Function which prints out usage message. */
11static void
12help(void)
13{
14 printf(
15"TRACE target v%s takes no options\n",
16IPTABLES_VERSION);
17}
18
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000019/* Function which parses command options; returns true if it
20 ate an option */
21static int
22parse(int c, char **argv, int invert, unsigned int *flags,
23 const void *entry,
24 struct xt_entry_target **target)
25{
26 return 0;
27}
28
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000029static struct xtables_target trace = {
30 .family = AF_INET,
31 .name = "TRACE",
32 .version = IPTABLES_VERSION,
33 .size = XT_ALIGN(0),
34 .userspacesize = XT_ALIGN(0),
35 .help = &help,
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000036 .parse = &parse,
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000037};
38
39static struct xtables_target trace6 = {
40 .family = AF_INET6,
41 .name = "TRACE",
42 .version = IPTABLES_VERSION,
43 .size = XT_ALIGN(0),
44 .userspacesize = XT_ALIGN(0),
45 .help = &help,
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000046 .parse = &parse,
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000047};
48
49void _init(void)
50{
51 xtables_register_target(&trace);
52 xtables_register_target(&trace6);
53}