libipt_unclean.c revision 4008138e2b5248940265b160fae001d8954fae21
1/* 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", IPTABLES_VERSION);
14}
15
16static struct option opts[] = {
17	{0}
18};
19
20/* Function which parses command options; returns true if it
21   ate an option */
22static int
23parse(int c, char **argv, int invert, unsigned int *flags,
24      const struct ipt_entry *entry,
25      unsigned int *nfcache,
26      struct ipt_entry_match **match)
27{
28	return 0;
29}
30
31/* Final check; must have specified --mac. */
32static void final_check(unsigned int flags)
33{
34}
35
36static
37struct iptables_match unclean = {
38	.next		= NULL,
39	.name		= "unclean",
40	.version	= IPTABLES_VERSION,
41	.size		= IPT_ALIGN(0),
42	.userspacesize	= IPT_ALIGN(0),
43	.help		= &help,
44	.parse		= &parse,
45	.final_check	= &final_check,
46	.print		= NULL,
47	.save		= NULL,
48	.extra_opts	= opts
49};
50
51void ipt_unclean_init(void)
52{
53	register_match(&unclean);
54}
55