GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / include / linux / netfilter / xt_geoip.h
blob52adc8381152c5214538f3321dc68065d112f9d5
1 /* ipt_geoip.h header file for libipt_geoip.c and ipt_geoip.c
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * Copyright (c) 2004, 2005, 2006, 2007, 2008
10 * Samuel Jean
11 * Nicolas Bouliane
13 #ifndef _XT_GEOIP_H
14 #define _XT_GEOIP_H
16 #define XT_GEOIP_SRC 0x01 /* Perform check on Source IP */
17 #define XT_GEOIP_DST 0x02 /* Perform check on Destination IP */
18 #define XT_GEOIP_INV 0x04 /* Negate the condition */
20 #define XT_GEOIP_MAX 15 /* Maximum of countries */
22 struct geoip_subnet {
23 u_int32_t begin;
24 u_int32_t end;
27 struct geoip_info {
28 struct geoip_subnet *subnets;
29 u_int32_t count;
30 u_int32_t ref;
31 u_int16_t cc;
32 struct geoip_info *next;
33 struct geoip_info *prev;
36 struct xt_geoip_match_info {
37 u_int8_t flags;
38 u_int8_t count;
39 u_int16_t cc[XT_GEOIP_MAX];
41 /* Used internally by the kernel */
42 struct geoip_info *mem[XT_GEOIP_MAX];
43 u_int8_t *refcount;
45 /* not implemented yet:
46 void *fini;
50 #define COUNTRY(cc) (cc >> 8), (cc & 0x00FF)
52 #endif