blob: 54e13483ac46ebd1a9fea5404c24d48ccfc67afb [file] [log] [blame]
Marc Bouchere6869a82000-03-20 06:03:29 +00001/* Shared library add-on to iptables for standard target support. */
2#include <stdio.h>
3#include <netdb.h>
4#include <string.h>
5#include <stdlib.h>
6#include <limits.h>
7#include <getopt.h>
Yasuyuki KOZAKAIe72f60e2007-07-24 07:00:40 +00008#include <xtables.h>
Marc Bouchere6869a82000-03-20 06:03:29 +00009
Jan Engelhardt181dead2007-10-04 16:27:07 +000010static void standard_help(void)
Marc Bouchere6869a82000-03-20 06:03:29 +000011{
12 printf(
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020013"standard match options:\n"
14"(If target is DROP, ACCEPT, RETURN or nothing)\n");
Marc Bouchere6869a82000-03-20 06:03:29 +000015}
16
Jan Engelhardt181dead2007-10-04 16:27:07 +000017static int standard_parse(int c, char **argv, int invert, unsigned int *flags,
18 const void *entry, struct xt_entry_target **target)
Marc Bouchere6869a82000-03-20 06:03:29 +000019{
20 return 0;
21}
22
Jan Engelhardt181dead2007-10-04 16:27:07 +000023static struct xtables_target standard_target = {
Jan Engelhardt23545c22008-02-14 04:23:04 +010024 .family = AF_UNSPEC,
Yasuyuki KOZAKAIe72f60e2007-07-24 07:00:40 +000025 .name = "standard",
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020026 .version = XTABLES_VERSION,
Yasuyuki KOZAKAIe72f60e2007-07-24 07:00:40 +000027 .size = XT_ALIGN(sizeof(int)),
28 .userspacesize = XT_ALIGN(sizeof(int)),
Jan Engelhardt181dead2007-10-04 16:27:07 +000029 .help = standard_help,
30 .parse = standard_parse,
Marc Bouchere6869a82000-03-20 06:03:29 +000031};
32
33void _init(void)
34{
Jan Engelhardt181dead2007-10-04 16:27:07 +000035 xtables_register_target(&standard_target);
Marc Bouchere6869a82000-03-20 06:03:29 +000036}