1 /* ipt_geoip.h header file for libipt_geoip.c and ipt_geoip.c
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
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 */
28 struct geoip_subnet
*subnets
;
32 struct geoip_info
*next
;
33 struct geoip_info
*prev
;
36 struct xt_geoip_match_info
{
39 u_int16_t cc
[XT_GEOIP_MAX
];
41 /* Used internally by the kernel */
42 struct geoip_info
*mem
[XT_GEOIP_MAX
];
45 /* not implemented yet:
50 #define COUNTRY(cc) (cc >> 8), (cc & 0x00FF)