blob: b21c9ddaedd46ba34a8feda56098c3ed984cc468 [file] [log] [blame]
Bart De Schuymerff587202005-02-08 20:02:28 +00001/* ebtable_nat
2 *
3 * Authors:
4 * Bart De Schuymer <bdschuym@pandora.be>
5 *
6 * April, 2002
7 */
8
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00009#include <stdio.h>
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000010#include "../include/ebtables_u.h"
11
12#define NAT_VALID_HOOKS ((1 << NF_BR_PRE_ROUTING) | (1 << NF_BR_LOCAL_OUT) | \
13 (1 << NF_BR_POST_ROUTING))
14
Bart De Schuymer8339ff12004-01-14 20:05:27 +000015static void print_help(const char **hn)
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000016{
17 int i;
18
19 printf("Supported chains for the nat table:\n");
20 for (i = 0; i < NF_BR_NUMHOOKS; i++)
21 if (NAT_VALID_HOOKS & (1 << i))
22 printf("%s ", hn[i]);
23 printf("\n");
24}
25
26static struct
27ebt_u_table table =
28{
Bart De Schuymer7cf1cca2003-08-30 16:20:19 +000029 .name = "nat",
30 .help = print_help,
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000031};
32
Bart De Schuymer64182a32004-01-21 20:39:54 +000033void _init(void)
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000034{
Bart De Schuymer8339ff12004-01-14 20:05:27 +000035 ebt_register_table(&table);
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000036}