blob: b954e368fec28cc48aa1d1cebab449986f49cfe0 [file] [log] [blame]
Marc Bouchere6869a82000-03-20 06:03:29 +00001/* Shared library add-on to iptables for unclean. */
2#include <stdio.h>
3#include <stdlib.h>
4#include <getopt.h>
5#include <iptables.h>
6
7/* Function which prints out usage message. */
8static void
9help(void)
10{
11 printf(
12"unclean v%s takes no options\n"
13"\n", NETFILTER_VERSION);
14}
15
16static struct option opts[] = {
17 {0}
18};
19
20/* Initialize the match. */
21static void
22init(struct ipt_entry_match *m, unsigned int *nfcache)
23{
24 /* Can't cache this. */
25 *nfcache |= NFC_UNKNOWN;
26}
27
28/* Function which parses command options; returns true if it
29 ate an option */
30static int
31parse(int c, char **argv, int invert, unsigned int *flags,
32 const struct ipt_entry *entry,
33 unsigned int *nfcache,
34 struct ipt_entry_match **match)
35{
36 return 0;
37}
38
39/* Final check; must have specified --mac. */
40static void final_check(unsigned int flags)
41{
42}
43
Marc Bouchere6869a82000-03-20 06:03:29 +000044struct iptables_match unclean
45= { NULL,
46 "unclean",
47 NETFILTER_VERSION,
Rusty Russell73f72f52000-07-03 10:17:57 +000048 IPT_ALIGN(0),
49 IPT_ALIGN(0),
Marc Bouchere6869a82000-03-20 06:03:29 +000050 &help,
51 &init,
52 &parse,
53 &final_check,
54 NULL, /* print */
Rusty Russell2d01dca2000-09-01 06:03:12 +000055 NULL, /* save */
Marc Bouchere6869a82000-03-20 06:03:29 +000056 opts
57};
58
59void _init(void)
60{
61 register_match(&unclean);
62}