aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter_arp/arp_tables.h15
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h18
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h20
3 files changed, 24 insertions, 29 deletions
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index 81938600470d..7e193c9241b3 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -24,6 +24,8 @@
24#ifndef __KERNEL__ 24#ifndef __KERNEL__
25#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN 25#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
26#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN 26#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
27#define arpt_entry_target xt_entry_target
28#define arpt_standard_target xt_standard_target
27#endif 29#endif
28 30
29#define ARPT_DEV_ADDR_LEN_MAX 16 31#define ARPT_DEV_ADDR_LEN_MAX 16
@@ -65,9 +67,6 @@ struct arpt_arp {
65 u_int16_t invflags; 67 u_int16_t invflags;
66}; 68};
67 69
68#define arpt_entry_target xt_entry_target
69#define arpt_standard_target xt_standard_target
70
71/* Values for "flag" field in struct arpt_ip (general arp structure). 70/* Values for "flag" field in struct arpt_ip (general arp structure).
72 * No flags defined yet. 71 * No flags defined yet.
73 */ 72 */
@@ -208,7 +207,7 @@ struct arpt_get_entries {
208#define ARPT_ERROR_TARGET XT_ERROR_TARGET 207#define ARPT_ERROR_TARGET XT_ERROR_TARGET
209 208
210/* Helper functions */ 209/* Helper functions */
211static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e) 210static __inline__ struct xt_entry_target *arpt_get_target(struct arpt_entry *e)
212{ 211{
213 return (void *)e + e->target_offset; 212 return (void *)e + e->target_offset;
214} 213}
@@ -227,11 +226,11 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
227/* Standard entry. */ 226/* Standard entry. */
228struct arpt_standard { 227struct arpt_standard {
229 struct arpt_entry entry; 228 struct arpt_entry entry;
230 struct arpt_standard_target target; 229 struct xt_standard_target target;
231}; 230};
232 231
233struct arpt_error_target { 232struct arpt_error_target {
234 struct arpt_entry_target target; 233 struct xt_entry_target target;
235 char errorname[XT_FUNCTION_MAXNAMELEN]; 234 char errorname[XT_FUNCTION_MAXNAMELEN];
236}; 235};
237 236
@@ -250,7 +249,7 @@ struct arpt_error {
250{ \ 249{ \
251 .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \ 250 .entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \
252 .target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \ 251 .target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \
253 sizeof(struct arpt_standard_target)), \ 252 sizeof(struct xt_standard_target)), \
254 .target.verdict = -(__verdict) - 1, \ 253 .target.verdict = -(__verdict) - 1, \
255} 254}
256 255
@@ -287,7 +286,7 @@ struct compat_arpt_entry {
287 unsigned char elems[0]; 286 unsigned char elems[0];
288}; 287};
289 288
290static inline struct arpt_entry_target * 289static inline struct xt_entry_target *
291compat_arpt_get_target(struct compat_arpt_entry *e) 290compat_arpt_get_target(struct compat_arpt_entry *e)
292{ 291{
293 return (void *)e + e->target_offset; 292 return (void *)e + e->target_offset;
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 1b7cdf1137e3..ec506918a9b9 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -34,6 +34,10 @@
34#define ipt_target xt_target 34#define ipt_target xt_target
35#define ipt_table xt_table 35#define ipt_table xt_table
36#define ipt_get_revision xt_get_revision 36#define ipt_get_revision xt_get_revision
37#define ipt_entry_match xt_entry_match
38#define ipt_entry_target xt_entry_target
39#define ipt_standard_target xt_standard_target
40#define ipt_counters xt_counters
37#endif 41#endif
38 42
39/* Yes, Virginia, you have to zero the padding. */ 43/* Yes, Virginia, you have to zero the padding. */
@@ -54,12 +58,6 @@ struct ipt_ip {
54 u_int8_t invflags; 58 u_int8_t invflags;
55}; 59};
56 60
57#define ipt_entry_match xt_entry_match
58#define ipt_entry_target xt_entry_target
59#define ipt_standard_target xt_standard_target
60
61#define ipt_counters xt_counters
62
63/* Values for "flag" field in struct ipt_ip (general ip structure). */ 61/* Values for "flag" field in struct ipt_ip (general ip structure). */
64#define IPT_F_FRAG 0x01 /* Set if rule is a fragment rule */ 62#define IPT_F_FRAG 0x01 /* Set if rule is a fragment rule */
65#define IPT_F_GOTO 0x02 /* Set if jump is a goto */ 63#define IPT_F_GOTO 0x02 /* Set if jump is a goto */
@@ -219,7 +217,7 @@ struct ipt_get_entries {
219#define IPT_ERROR_TARGET XT_ERROR_TARGET 217#define IPT_ERROR_TARGET XT_ERROR_TARGET
220 218
221/* Helper functions */ 219/* Helper functions */
222static __inline__ struct ipt_entry_target * 220static __inline__ struct xt_entry_target *
223ipt_get_target(struct ipt_entry *e) 221ipt_get_target(struct ipt_entry *e)
224{ 222{
225 return (void *)e + e->target_offset; 223 return (void *)e + e->target_offset;
@@ -251,11 +249,11 @@ extern void ipt_unregister_table(struct net *net, struct xt_table *table);
251/* Standard entry. */ 249/* Standard entry. */
252struct ipt_standard { 250struct ipt_standard {
253 struct ipt_entry entry; 251 struct ipt_entry entry;
254 struct ipt_standard_target target; 252 struct xt_standard_target target;
255}; 253};
256 254
257struct ipt_error_target { 255struct ipt_error_target {
258 struct ipt_entry_target target; 256 struct xt_entry_target target;
259 char errorname[XT_FUNCTION_MAXNAMELEN]; 257 char errorname[XT_FUNCTION_MAXNAMELEN];
260}; 258};
261 259
@@ -309,7 +307,7 @@ struct compat_ipt_entry {
309}; 307};
310 308
311/* Helper functions */ 309/* Helper functions */
312static inline struct ipt_entry_target * 310static inline struct xt_entry_target *
313compat_ipt_get_target(struct compat_ipt_entry *e) 311compat_ipt_get_target(struct compat_ipt_entry *e)
314{ 312{
315 return (void *)e + e->target_offset; 313 return (void *)e + e->target_offset;
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index abe31d020e3c..40d11fa05840 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -34,6 +34,10 @@
34#define ip6t_target xt_target 34#define ip6t_target xt_target
35#define ip6t_table xt_table 35#define ip6t_table xt_table
36#define ip6t_get_revision xt_get_revision 36#define ip6t_get_revision xt_get_revision
37#define ip6t_entry_match xt_entry_match
38#define ip6t_entry_target xt_entry_target
39#define ip6t_standard_target xt_standard_target
40#define ip6t_counters xt_counters
37#endif 41#endif
38 42
39/* Yes, Virginia, you have to zero the padding. */ 43/* Yes, Virginia, you have to zero the padding. */
@@ -63,12 +67,6 @@ struct ip6t_ip6 {
63 u_int8_t invflags; 67 u_int8_t invflags;
64}; 68};
65 69
66#define ip6t_entry_match xt_entry_match
67#define ip6t_entry_target xt_entry_target
68#define ip6t_standard_target xt_standard_target
69
70#define ip6t_counters xt_counters
71
72/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ 70/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
73#define IP6T_F_PROTO 0x01 /* Set if rule cares about upper 71#define IP6T_F_PROTO 0x01 /* Set if rule cares about upper
74 protocols */ 72 protocols */
@@ -113,11 +111,11 @@ struct ip6t_entry {
113/* Standard entry */ 111/* Standard entry */
114struct ip6t_standard { 112struct ip6t_standard {
115 struct ip6t_entry entry; 113 struct ip6t_entry entry;
116 struct ip6t_standard_target target; 114 struct xt_standard_target target;
117}; 115};
118 116
119struct ip6t_error_target { 117struct ip6t_error_target {
120 struct ip6t_entry_target target; 118 struct xt_entry_target target;
121 char errorname[XT_FUNCTION_MAXNAMELEN]; 119 char errorname[XT_FUNCTION_MAXNAMELEN];
122}; 120};
123 121
@@ -136,7 +134,7 @@ struct ip6t_error {
136{ \ 134{ \
137 .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \ 135 .entry = IP6T_ENTRY_INIT(sizeof(struct ip6t_standard)), \
138 .target = XT_TARGET_INIT(IP6T_STANDARD_TARGET, \ 136 .target = XT_TARGET_INIT(IP6T_STANDARD_TARGET, \
139 sizeof(struct ip6t_standard_target)), \ 137 sizeof(struct xt_standard_target)), \
140 .target.verdict = -(__verdict) - 1, \ 138 .target.verdict = -(__verdict) - 1, \
141} 139}
142 140
@@ -275,7 +273,7 @@ struct ip6t_get_entries {
275#define IP6T_ERROR_TARGET XT_ERROR_TARGET 273#define IP6T_ERROR_TARGET XT_ERROR_TARGET
276 274
277/* Helper functions */ 275/* Helper functions */
278static __inline__ struct ip6t_entry_target * 276static __inline__ struct xt_entry_target *
279ip6t_get_target(struct ip6t_entry *e) 277ip6t_get_target(struct ip6t_entry *e)
280{ 278{
281 return (void *)e + e->target_offset; 279 return (void *)e + e->target_offset;
@@ -332,7 +330,7 @@ struct compat_ip6t_entry {
332 unsigned char elems[0]; 330 unsigned char elems[0];
333}; 331};
334 332
335static inline struct ip6t_entry_target * 333static inline struct xt_entry_target *
336compat_ip6t_get_target(struct compat_ip6t_entry *e) 334compat_ip6t_get_target(struct compat_ip6t_entry *e)
337{ 335{
338 return (void *)e + e->target_offset; 336 return (void *)e + e->target_offset;