1/* ebtable_filter 2 * 3 * Authors: 4 * Bart De Schuymer <bdschuym@pandora.be> 5 * 6 * April, 2002 7 */ 8 9#include <stdio.h> 10#include "../include/ebtables_u.h" 11 12#define FILTER_VALID_HOOKS ((1 << NF_BR_LOCAL_IN) | (1 << NF_BR_FORWARD) | \ 13 (1 << NF_BR_LOCAL_OUT)) 14 15static void print_help(const char **hn) 16{ 17 int i; 18 19 printf("Supported chains for the filter table:\n"); 20 for (i = 0; i < NF_BR_NUMHOOKS; i++) 21 if (FILTER_VALID_HOOKS & (1 << i)) 22 printf("%s ", hn[i]); 23 printf("\n"); 24} 25 26static struct ebt_u_table table = 27{ 28 .name = "filter", 29 .help = print_help, 30}; 31 32void _init(void) 33{ 34 ebt_register_table(&table); 35} 36