1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
15 #include <linux/compiler.h>
16 #include <linux/netfilter_ipv6.h>
18 #include <linux/netfilter/x_tables.h>
20 #define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
21 #define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
23 #define ip6t_match xt_match
24 #define ip6t_target xt_target
25 #define ip6t_table xt_table
26 #define ip6t_get_revision xt_get_revision
30 struct in6_addr src, dst;
32 struct in6_addr smsk, dmsk;
33 char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
34 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
45 #define ip6t_entry_match xt_entry_match
46 #define ip6t_entry_target xt_entry_target
47 #define ip6t_standard_target xt_standard_target
49 #define ip6t_counters xt_counters
51 #define IP6T_F_PROTO 0x01
52 #define IP6T_F_TOS 0x02
53 #define IP6T_F_GOTO 0x04
54 #define IP6T_F_MASK 0x07
56 #define IP6T_INV_VIA_IN 0x01
57 #define IP6T_INV_VIA_OUT 0x02
58 #define IP6T_INV_TOS 0x04
59 #define IP6T_INV_SRCIP 0x08
60 #define IP6T_INV_DSTIP 0x10
61 #define IP6T_INV_FRAG 0x20
62 #define IP6T_INV_PROTO XT_INV_PROTO
63 #define IP6T_INV_MASK 0x7F
71 u_int16_t target_offset;
73 u_int16_t next_offset;
75 unsigned int comefrom;
77 struct xt_counters counters;
79 unsigned char elems[0];
82 #define IP6T_BASE_CTL XT_BASE_CTL
84 #define IP6T_SO_SET_REPLACE XT_SO_SET_REPLACE
85 #define IP6T_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS
86 #define IP6T_SO_SET_MAX XT_SO_SET_MAX
88 #define IP6T_SO_GET_INFO XT_SO_GET_INFO
89 #define IP6T_SO_GET_ENTRIES XT_SO_GET_ENTRIES
90 #define IP6T_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH
91 #define IP6T_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET
92 #define IP6T_SO_GET_MAX XT_SO_GET_REVISION_TARGET
94 #define IP6T_CONTINUE XT_CONTINUE
96 #define IP6T_RETURN XT_RETURN
98 #include <linux/netfilter/xt_tcpudp.h>
100 #define ip6t_tcp xt_tcp
101 #define ip6t_udp xt_udp
103 #define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT
104 #define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT
105 #define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS
106 #define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION
107 #define IP6T_TCP_INV_MASK XT_TCP_INV_MASK
109 #define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT
110 #define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT
111 #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK
120 #define IP6T_ICMP_INV 0x01
125 char name[IP6T_TABLE_MAXNAMELEN];
127 unsigned int valid_hooks;
129 unsigned int hook_entry[NF_IP6_NUMHOOKS];
131 unsigned int underflow[NF_IP6_NUMHOOKS];
133 unsigned int num_entries;
141 char name[IP6T_TABLE_MAXNAMELEN];
143 unsigned int valid_hooks;
145 unsigned int num_entries;
149 unsigned int hook_entry[NF_IP6_NUMHOOKS];
151 unsigned int underflow[NF_IP6_NUMHOOKS];
153 unsigned int num_counters;
155 struct xt_counters __user *counters;
157 struct ip6t_entry entries[0];
160 #define ip6t_counters_info xt_counters_info
162 struct ip6t_get_entries
165 char name[IP6T_TABLE_MAXNAMELEN];
169 struct ip6t_entry entrytable[0];
172 #define IP6T_STANDARD_TARGET XT_STANDARD_TARGET
174 #define IP6T_ERROR_TARGET XT_ERROR_TARGET
176 #define IP6T_MATCH_ITERATE(e, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry_match *__m; for (__i = sizeof(struct ip6t_entry); __i < (e)->target_offset; __i += __m->u.match_size) { __m = (void *)(e) + __i; __ret = fn(__m , ## args); if (__ret != 0) break; } __ret; })
177 #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry *__e; for (__i = 0; __i < (size); __i += __e->next_offset) { __e = (void *)(entries) + __i; __ret = fn(__e , ## args); if (__ret != 0) break; } __ret; })