blob: d64e21dbbe051734a057bbc8d05c42e30a98dbbc [file] [log] [blame]
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00001#include <stdio.h>
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00002#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
Bart De Schuymer8339ff12004-01-14 20:05:27 +00007static void print_help(const char **hn)
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00008{
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
18static struct
19ebt_u_table table =
20{
Bart De Schuymer7cf1cca2003-08-30 16:20:19 +000021 .name = "nat",
22 .help = print_help,
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000023};
24
Bart De Schuymer64182a32004-01-21 20:39:54 +000025void _init(void)
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000026{
Bart De Schuymer8339ff12004-01-14 20:05:27 +000027 ebt_register_table(&table);
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000028}