lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | /* 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 <xtables.h> |
| 9 | |
| 10 | static void standard_help(void) |
| 11 | { |
| 12 | printf( |
| 13 | "standard match options:\n" |
| 14 | "(If target is DROP, ACCEPT, RETURN or nothing)\n"); |
| 15 | } |
| 16 | |
| 17 | static int standard_parse(int c, char **argv, int invert, unsigned int *flags, |
| 18 | const void *entry, struct xt_entry_target **target) |
| 19 | { |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | static struct xtables_target standard_target = { |
| 24 | .family = AF_UNSPEC, |
| 25 | .name = "standard", |
| 26 | .version = XTABLES_VERSION, |
| 27 | .size = XT_ALIGN(sizeof(int)), |
| 28 | .userspacesize = XT_ALIGN(sizeof(int)), |
| 29 | .help = standard_help, |
| 30 | .parse = standard_parse, |
| 31 | }; |
| 32 | |
| 33 | void _init(void) |
| 34 | { |
| 35 | xtables_register_target(&standard_target); |
| 36 | } |