blob: c48882f1d8afa312034eb5fc5bdfe3ff99902fe7 [file] [log] [blame]
Philip Blundellee604b72000-06-08 04:39: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>
8#include <ip6tables.h>
9
10/* Function which prints out usage message. */
11static void
12help(void)
13{
14 printf(
15"Standard v%s options:\n"
Harald Welte80fe35d2002-05-29 13:08:15 +000016"(If target is DROP, ACCEPT, RETURN or nothing)\n", IPTABLES_VERSION);
Philip Blundellee604b72000-06-08 04:39:29 +000017}
18
19static struct option opts[] = {
20 {0}
21};
22
23/* Initialize the target. */
24static void
25init(struct ip6t_entry_target *t, unsigned int *nfcache)
26{
27}
28
29/* Function which parses command options; returns true if it
30 ate an option */
31static int
32parse(int c, char **argv, int invert, unsigned int *flags,
33 const struct ip6t_entry *entry,
34 struct ip6t_entry_target **target)
35{
36 return 0;
37}
38
39/* Final check; don't care. */
40static void final_check(unsigned int flags)
41{
42}
43
44/* Saves the targinfo in parsable form to stdout. */
45static void
46save(const struct ip6t_ip6 *ip6, const struct ip6t_entry_target *target)
47{
48}
49
Harald Welte02aa7332005-02-01 15:38:20 +000050static struct ip6tables_target standard = {
51 .name = "standard",
52 .version = IPTABLES_VERSION,
53 .size = IP6T_ALIGN(sizeof(int)),
54 .userspacesize = IP6T_ALIGN(sizeof(int)),
55 .help = &help,
56 .init = &init,
57 .parse = &parse,
58 .final_check = &final_check,
59 .save = &save,
60 .extra_opts = opts,
Philip Blundellee604b72000-06-08 04:39:29 +000061};
62
63void _init(void)
64{
65 register_target6(&standard);
66}