blob: b8eb969d8b2fb90b76807ea66d93eac98dfcdbbc [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
Jan Engelhardt932e6482007-10-04 16:27:30 +000010static void TRACE_help(void)
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000011{
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020012 printf("TRACE target takes no options\n");
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000013}
14
Jan Engelhardt932e6482007-10-04 16:27:30 +000015static int TRACE_parse(int c, char **argv, int invert, unsigned int *flags,
16 const void *entry, struct xt_entry_target **target)
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000017{
18 return 0;
19}
20
Jan Engelhardt932e6482007-10-04 16:27:30 +000021static struct xtables_target trace_target = {
Jan Engelhardt23545c22008-02-14 04:23:04 +010022 .family = AF_UNSPEC,
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000023 .name = "TRACE",
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020024 .version = XTABLES_VERSION,
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000025 .size = XT_ALIGN(0),
26 .userspacesize = XT_ALIGN(0),
Jan Engelhardt932e6482007-10-04 16:27:30 +000027 .help = TRACE_help,
28 .parse = TRACE_parse,
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000029};
30
31void _init(void)
32{
Jan Engelhardt932e6482007-10-04 16:27:30 +000033 xtables_register_target(&trace_target);
Yasuyuki KOZAKAI1a31b422007-08-04 08:22:03 +000034}