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_arp.h>
18 #include <linux/netfilter/x_tables.h>
20 #define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
21 #define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
22 #define arpt_target xt_target
23 #define arpt_table xt_table
25 #define ARPT_DEV_ADDR_LEN_MAX 16
27 struct arpt_devaddr_info {
28 char addr[ARPT_DEV_ADDR_LEN_MAX];
29 char mask[ARPT_DEV_ADDR_LEN_MAX];
34 struct in_addr src, tgt;
36 struct in_addr smsk, tmsk;
38 u_int8_t arhln, arhln_mask;
39 struct arpt_devaddr_info src_devaddr;
40 struct arpt_devaddr_info tgt_devaddr;
42 u_int16_t arpop, arpop_mask;
44 u_int16_t arhrd, arhrd_mask;
45 u_int16_t arpro, arpro_mask;
47 char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
48 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
55 #define arpt_entry_target xt_entry_target
56 #define arpt_standard_target xt_standard_target
58 #define ARPT_F_MASK 0x00
60 #define ARPT_INV_VIA_IN 0x0001
61 #define ARPT_INV_VIA_OUT 0x0002
62 #define ARPT_INV_SRCIP 0x0004
63 #define ARPT_INV_TGTIP 0x0008
64 #define ARPT_INV_SRCDEVADDR 0x0010
65 #define ARPT_INV_TGTDEVADDR 0x0020
66 #define ARPT_INV_ARPOP 0x0040
67 #define ARPT_INV_ARPHRD 0x0080
68 #define ARPT_INV_ARPPRO 0x0100
69 #define ARPT_INV_ARPHLN 0x0200
70 #define ARPT_INV_MASK 0x03FF
76 u_int16_t target_offset;
78 u_int16_t next_offset;
80 unsigned int comefrom;
82 struct xt_counters counters;
84 unsigned char elems[0];
87 #define ARPT_CTL_OFFSET 32
88 #define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET)
90 #define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET)
91 #define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET)
92 #define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET)
94 #define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET)
95 #define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET)
97 #define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
98 #define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
100 #define ARPT_CONTINUE XT_CONTINUE
102 #define ARPT_RETURN XT_RETURN
107 char name[ARPT_TABLE_MAXNAMELEN];
109 unsigned int valid_hooks;
111 unsigned int hook_entry[NF_ARP_NUMHOOKS];
113 unsigned int underflow[NF_ARP_NUMHOOKS];
115 unsigned int num_entries;
123 char name[ARPT_TABLE_MAXNAMELEN];
125 unsigned int valid_hooks;
127 unsigned int num_entries;
131 unsigned int hook_entry[NF_ARP_NUMHOOKS];
133 unsigned int underflow[NF_ARP_NUMHOOKS];
135 unsigned int num_counters;
137 struct xt_counters __user *counters;
139 struct arpt_entry entries[0];
142 #define arpt_counters_info xt_counters_info
144 struct arpt_get_entries
147 char name[ARPT_TABLE_MAXNAMELEN];
151 struct arpt_entry entrytable[0];
154 #define ARPT_STANDARD_TARGET XT_STANDARD_TARGET
156 #define ARPT_ERROR_TARGET XT_ERROR_TARGET
158 #define ARPT_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct arpt_entry *__entry; for (__i = 0; __i < (size); __i += __entry->next_offset) { __entry = (void *)(entries) + __i; __ret = fn(__entry , ## args); if (__ret != 0) break; } __ret; })