blob: 22db24ba31d073f4d0ed0d3b69351bbcd418e072 [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>
8#include <iptables.h>
9
10/* Function which prints out usage message. */
11static void
12help(void)
13{
14 printf(
15"Standard v%s options:\n"
16"(If target is DROP, ACCEPT, RETURN or nothing)\n", NETFILTER_VERSION);
17}
18
19static struct option opts[] = {
20 {0}
21};
22
23/* Initialize the target. */
24static void
25init(struct ipt_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 ipt_entry *entry,
34 struct ipt_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 ipt_ip *ip, const struct ipt_entry_target *target)
47{
48}
49
50struct iptables_target standard
51= { NULL,
52 "standard",
53 NETFILTER_VERSION,
Rusty Russell73f72f52000-07-03 10:17:57 +000054 IPT_ALIGN(sizeof(int)),
55 IPT_ALIGN(sizeof(int)),
Marc Bouchere6869a82000-03-20 06:03:29 +000056 &help,
57 &init,
58 &parse,
59 &final_check,
60 NULL, /* print */
61 &save,
62 opts
63};
64
65void _init(void)
66{
67 register_target(&standard);
68}