Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 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. */ |
| 8 | static void |
| 9 | help(void) |
| 10 | { |
| 11 | printf( |
| 12 | "unclean v%s takes no options\n" |
Harald Welte | 80fe35d | 2002-05-29 13:08:15 +0000 | [diff] [blame] | 13 | "\n", IPTABLES_VERSION); |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | static struct option opts[] = { |
| 17 | {0} |
| 18 | }; |
| 19 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 20 | /* Function which parses command options; returns true if it |
| 21 | ate an option */ |
| 22 | static int |
| 23 | parse(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. */ |
| 32 | static void final_check(unsigned int flags) |
| 33 | { |
| 34 | } |
| 35 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 36 | static |
Pablo Neira | 8caee8b | 2004-12-28 13:11:59 +0000 | [diff] [blame] | 37 | struct 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, |
Pablo Neira | 8caee8b | 2004-12-28 13:11:59 +0000 | [diff] [blame] | 44 | .parse = &parse, |
| 45 | .final_check = &final_check, |
| 46 | .print = NULL, |
| 47 | .save = NULL, |
| 48 | .extra_opts = opts |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | void _init(void) |
| 52 | { |
| 53 | register_match(&unclean); |
| 54 | } |