Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 1 | #include <stdio.h> |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 2 | #include "../include/ebtables_u.h" |
| 3 | |
| 4 | #define NAT_VALID_HOOKS ((1 << NF_BR_PRE_ROUTING) | (1 << NF_BR_LOCAL_OUT) | \ |
| 5 | (1 << NF_BR_POST_ROUTING)) |
| 6 | |
| 7 | static void print_help(char **hn) |
| 8 | { |
| 9 | int i; |
| 10 | |
| 11 | printf("Supported chains for the nat table:\n"); |
| 12 | for (i = 0; i < NF_BR_NUMHOOKS; i++) |
| 13 | if (NAT_VALID_HOOKS & (1 << i)) |
| 14 | printf("%s ", hn[i]); |
| 15 | printf("\n"); |
| 16 | } |
| 17 | |
| 18 | static struct |
| 19 | ebt_u_table table = |
| 20 | { |
Bart De Schuymer | 7cf1cca | 2003-08-30 16:20:19 +0000 | [diff] [blame^] | 21 | .name = "nat", |
| 22 | .help = print_help, |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | static void _init(void) __attribute__ ((constructor)); |
| 26 | static void _init(void) |
| 27 | { |
| 28 | register_table(&table); |
| 29 | } |