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 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 16 | /* Function which parses command options; returns true if it |
| 17 | ate an option */ |
| 18 | static int |
| 19 | parse(int c, char **argv, int invert, unsigned int *flags, |
Yasuyuki KOZAKAI | c0a9ab9 | 2007-07-24 06:02:05 +0000 | [diff] [blame] | 20 | const void *entry, |
Yasuyuki KOZAKAI | 193df8e | 2007-07-24 05:57:28 +0000 | [diff] [blame] | 21 | struct xt_entry_match **match) |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 22 | { |
| 23 | return 0; |
| 24 | } |
| 25 | |
Harald Welte | 3efb6ea | 2001-08-06 18:50:21 +0000 | [diff] [blame] | 26 | static |
Pablo Neira | 8caee8b | 2004-12-28 13:11:59 +0000 | [diff] [blame] | 27 | struct iptables_match unclean = { |
Pablo Neira | 8caee8b | 2004-12-28 13:11:59 +0000 | [diff] [blame] | 28 | .name = "unclean", |
| 29 | .version = IPTABLES_VERSION, |
| 30 | .size = IPT_ALIGN(0), |
| 31 | .userspacesize = IPT_ALIGN(0), |
| 32 | .help = &help, |
Pablo Neira | 8caee8b | 2004-12-28 13:11:59 +0000 | [diff] [blame] | 33 | .parse = &parse, |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | void _init(void) |
| 37 | { |
| 38 | register_match(&unclean); |
| 39 | } |