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 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _ARPTABLES_H 20 #define _ARPTABLES_H 21 #include <linux/compiler.h> 22 #include <linux/netfilter_arp.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #include <linux/netfilter/x_tables.h> 25 #define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN 26 #define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN 27 #define arpt_target xt_target 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define arpt_table xt_table 30 #define ARPT_DEV_ADDR_LEN_MAX 16 31 struct arpt_devaddr_info { 32 char addr[ARPT_DEV_ADDR_LEN_MAX]; 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 char mask[ARPT_DEV_ADDR_LEN_MAX]; 35 }; 36 struct arpt_arp { 37 struct in_addr src, tgt; 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 struct in_addr smsk, tmsk; 40 u_int8_t arhln, arhln_mask; 41 struct arpt_devaddr_info src_devaddr; 42 struct arpt_devaddr_info tgt_devaddr; 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 u_int16_t arpop, arpop_mask; 45 u_int16_t arhrd, arhrd_mask; 46 u_int16_t arpro, arpro_mask; 47 char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; 50 u_int8_t flags; 51 u_int16_t invflags; 52 }; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define arpt_entry_target xt_entry_target 55 #define arpt_standard_target xt_standard_target 56 #define ARPT_F_MASK 0x00 57 #define ARPT_INV_VIA_IN 0x0001 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define ARPT_INV_VIA_OUT 0x0002 60 #define ARPT_INV_SRCIP 0x0004 61 #define ARPT_INV_TGTIP 0x0008 62 #define ARPT_INV_SRCDEVADDR 0x0010 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define ARPT_INV_TGTDEVADDR 0x0020 65 #define ARPT_INV_ARPOP 0x0040 66 #define ARPT_INV_ARPHRD 0x0080 67 #define ARPT_INV_ARPPRO 0x0100 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define ARPT_INV_ARPHLN 0x0200 70 #define ARPT_INV_MASK 0x03FF 71 struct arpt_entry 72 { 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 struct arpt_arp arp; 75 u_int16_t target_offset; 76 u_int16_t next_offset; 77 unsigned int comefrom; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 struct xt_counters counters; 80 unsigned char elems[0]; 81 }; 82 #define ARPT_CTL_OFFSET 32 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET) 85 #define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET) 86 #define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET) 87 #define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET) 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET) 90 #define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET) 91 #define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET) 92 #define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET) 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define ARPT_CONTINUE XT_CONTINUE 95 #define ARPT_RETURN XT_RETURN 96 struct arpt_getinfo 97 { 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 char name[ARPT_TABLE_MAXNAMELEN]; 100 unsigned int valid_hooks; 101 unsigned int hook_entry[NF_ARP_NUMHOOKS]; 102 unsigned int underflow[NF_ARP_NUMHOOKS]; 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 unsigned int num_entries; 105 unsigned int size; 106 }; 107 struct arpt_replace 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 { 110 char name[ARPT_TABLE_MAXNAMELEN]; 111 unsigned int valid_hooks; 112 unsigned int num_entries; 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 unsigned int size; 115 unsigned int hook_entry[NF_ARP_NUMHOOKS]; 116 unsigned int underflow[NF_ARP_NUMHOOKS]; 117 unsigned int num_counters; 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 struct xt_counters __user *counters; 120 struct arpt_entry entries[0]; 121 }; 122 #define arpt_counters_info xt_counters_info 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 struct arpt_get_entries 125 { 126 char name[ARPT_TABLE_MAXNAMELEN]; 127 unsigned int size; 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 struct arpt_entry entrytable[0]; 130 }; 131 #define ARPT_STANDARD_TARGET XT_STANDARD_TARGET 132 #define ARPT_ERROR_TARGET XT_ERROR_TARGET 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 #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; }) 135 #endif 136