1/****************************************************************************
2 ****************************************************************************
3 ***
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.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _IP6_TABLES_H
13#define _IP6_TABLES_H
14
15#include <linux/compiler.h>
16#include <linux/netfilter_ipv6.h>
17
18#include <linux/netfilter/x_tables.h>
19
20#define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
21#define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
22
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
27
28struct ip6t_ip6 {
29
30 struct in6_addr src, dst;
31
32 struct in6_addr smsk, dmsk;
33 char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
34 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
35
36 u_int16_t proto;
37
38 u_int8_t tos;
39
40 u_int8_t flags;
41
42 u_int8_t invflags;
43};
44
45#define ip6t_entry_match xt_entry_match
46#define ip6t_entry_target xt_entry_target
47#define ip6t_standard_target xt_standard_target
48
49#define ip6t_counters xt_counters
50
51#define IP6T_F_PROTO 0x01
52#define IP6T_F_TOS 0x02
53#define IP6T_F_GOTO 0x04
54#define IP6T_F_MASK 0x07
55
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
64
65struct ip6t_entry
66{
67 struct ip6t_ip6 ipv6;
68
69 unsigned int nfcache;
70
71 u_int16_t target_offset;
72
73 u_int16_t next_offset;
74
75 unsigned int comefrom;
76
77 struct xt_counters counters;
78
79 unsigned char elems[0];
80};
81
82#define IP6T_BASE_CTL XT_BASE_CTL
83
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
87
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
93
94#define IP6T_CONTINUE XT_CONTINUE
95
96#define IP6T_RETURN XT_RETURN
97
98#include <linux/netfilter/xt_tcpudp.h>
99
100#define ip6t_tcp xt_tcp
101#define ip6t_udp xt_udp
102
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
108
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
112
113struct ip6t_icmp
114{
115 u_int8_t type;
116 u_int8_t code[2];
117 u_int8_t invflags;
118};
119
120#define IP6T_ICMP_INV 0x01
121
122struct ip6t_getinfo
123{
124
125 char name[IP6T_TABLE_MAXNAMELEN];
126
127 unsigned int valid_hooks;
128
129 unsigned int hook_entry[NF_IP6_NUMHOOKS];
130
131 unsigned int underflow[NF_IP6_NUMHOOKS];
132
133 unsigned int num_entries;
134
135 unsigned int size;
136};
137
138struct ip6t_replace
139{
140
141 char name[IP6T_TABLE_MAXNAMELEN];
142
143 unsigned int valid_hooks;
144
145 unsigned int num_entries;
146
147 unsigned int size;
148
149 unsigned int hook_entry[NF_IP6_NUMHOOKS];
150
151 unsigned int underflow[NF_IP6_NUMHOOKS];
152
153 unsigned int num_counters;
154
155 struct xt_counters __user *counters;
156
157 struct ip6t_entry entries[0];
158};
159
160#define ip6t_counters_info xt_counters_info
161
162struct ip6t_get_entries
163{
164
165 char name[IP6T_TABLE_MAXNAMELEN];
166
167 unsigned int size;
168
169 struct ip6t_entry entrytable[0];
170};
171
172#define IP6T_STANDARD_TARGET XT_STANDARD_TARGET
173
174#define IP6T_ERROR_TARGET XT_ERROR_TARGET
175
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;  })
178#endif
179