diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2002-06-01 19:23:47 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2002-06-01 19:23:47 +0000 |
commit | 1abc55d3114378b4e73ec315eac6b122e55148c4 (patch) | |
tree | 2b4e1622873f7e6f8517b7862ec2b51a43a62d1a /extensions/ebtable_nat.c | |
download | ebtables-1abc55d3114378b4e73ec315eac6b122e55148c4.tar.gz |
Initial revision
Diffstat (limited to 'extensions/ebtable_nat.c')
-rw-r--r-- | extensions/ebtable_nat.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/extensions/ebtable_nat.c b/extensions/ebtable_nat.c new file mode 100644 index 0000000..4b4ca48 --- /dev/null +++ b/extensions/ebtable_nat.c @@ -0,0 +1,32 @@ +#include <stdio.h> +#include <sys/socket.h> +#include "../include/ebtables_u.h" + +#define NAT_VALID_HOOKS ((1 << NF_BR_PRE_ROUTING) | (1 << NF_BR_LOCAL_OUT) | \ + (1 << NF_BR_POST_ROUTING)) + +static void print_help(char **hn) +{ + int i; + + printf("Supported chains for the nat table:\n"); + for (i = 0; i < NF_BR_NUMHOOKS; i++) + if (NAT_VALID_HOOKS & (1 << i)) + printf("%s ", hn[i]); + printf("\n"); +} + +static struct +ebt_u_table table = +{ + "nat", + NULL, + print_help, + NULL +}; + +static void _init(void) __attribute__ ((constructor)); +static void _init(void) +{ + register_table(&table); +} |