~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to tools/remus/imqebt/extensions/ebtable_filter.c

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
15
static 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
 
 
26
static struct ebt_u_table table =
 
27
{
 
28
       .name           = "filter",
 
29
       .help           = print_help,
 
30
};
 
31
 
 
32
void _init(void)
 
33
{
 
34
       ebt_register_table(&table);
 
35
}