Home | History | Annotate | Download | only in netfilter_ipv4
      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 _UAPI_IPTABLES_H
     20 #define _UAPI_IPTABLES_H
     21 #include <linux/types.h>
     22 #include <linux/compiler.h>
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #include <linux/netfilter_ipv4.h>
     25 #include <linux/netfilter/x_tables.h>
     26 #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
     27 #define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define ipt_match xt_match
     30 #define ipt_target xt_target
     31 #define ipt_table xt_table
     32 #define ipt_get_revision xt_get_revision
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define ipt_entry_match xt_entry_match
     35 #define ipt_entry_target xt_entry_target
     36 #define ipt_standard_target xt_standard_target
     37 #define ipt_error_target xt_error_target
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define ipt_counters xt_counters
     40 #define IPT_CONTINUE XT_CONTINUE
     41 #define IPT_RETURN XT_RETURN
     42 #include <linux/netfilter/xt_tcpudp.h>
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define ipt_udp xt_udp
     45 #define ipt_tcp xt_tcp
     46 #define IPT_TCP_INV_SRCPT XT_TCP_INV_SRCPT
     47 #define IPT_TCP_INV_DSTPT XT_TCP_INV_DSTPT
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define IPT_TCP_INV_FLAGS XT_TCP_INV_FLAGS
     50 #define IPT_TCP_INV_OPTION XT_TCP_INV_OPTION
     51 #define IPT_TCP_INV_MASK XT_TCP_INV_MASK
     52 #define IPT_UDP_INV_SRCPT XT_UDP_INV_SRCPT
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 #define IPT_UDP_INV_DSTPT XT_UDP_INV_DSTPT
     55 #define IPT_UDP_INV_MASK XT_UDP_INV_MASK
     56 #define ipt_counters_info xt_counters_info
     57 #define IPT_STANDARD_TARGET XT_STANDARD_TARGET
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 #define IPT_ERROR_TARGET XT_ERROR_TARGET
     60 #define IPT_MATCH_ITERATE(e, fn, args...)   XT_MATCH_ITERATE(struct ipt_entry, e, fn, ## args)
     61 #define IPT_ENTRY_ITERATE(entries, size, fn, args...)   XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args)
     62 struct ipt_ip {
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64  struct in_addr src, dst;
     65  struct in_addr smsk, dmsk;
     66  char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
     67  unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69  __u16 proto;
     70  __u8 flags;
     71  __u8 invflags;
     72 };
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 #define IPT_F_FRAG 0x01
     75 #define IPT_F_GOTO 0x02
     76 #define IPT_F_MASK 0x03
     77 #define IPT_INV_VIA_IN 0x01
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 #define IPT_INV_VIA_OUT 0x02
     80 #define IPT_INV_TOS 0x04
     81 #define IPT_INV_SRCIP 0x08
     82 #define IPT_INV_DSTIP 0x10
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84 #define IPT_INV_FRAG 0x20
     85 #define IPT_INV_PROTO XT_INV_PROTO
     86 #define IPT_INV_MASK 0x7F
     87 struct ipt_entry {
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89  struct ipt_ip ip;
     90  unsigned int nfcache;
     91  __u16 target_offset;
     92  __u16 next_offset;
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94  unsigned int comefrom;
     95  struct xt_counters counters;
     96  unsigned char elems[0];
     97 };
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99 #define IPT_BASE_CTL 64
    100 #define IPT_SO_SET_REPLACE (IPT_BASE_CTL)
    101 #define IPT_SO_SET_ADD_COUNTERS (IPT_BASE_CTL + 1)
    102 #define IPT_SO_SET_MAX IPT_SO_SET_ADD_COUNTERS
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104 #define IPT_SO_GET_INFO (IPT_BASE_CTL)
    105 #define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1)
    106 #define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2)
    107 #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3)
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109 #define IPT_SO_GET_MAX IPT_SO_GET_REVISION_TARGET
    110 struct ipt_icmp {
    111  __u8 type;
    112  __u8 code[2];
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114  __u8 invflags;
    115 };
    116 #define IPT_ICMP_INV 0x01
    117 struct ipt_getinfo {
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119  char name[XT_TABLE_MAXNAMELEN];
    120  unsigned int valid_hooks;
    121  unsigned int hook_entry[NF_INET_NUMHOOKS];
    122  unsigned int underflow[NF_INET_NUMHOOKS];
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124  unsigned int num_entries;
    125  unsigned int size;
    126 };
    127 struct ipt_replace {
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129  char name[XT_TABLE_MAXNAMELEN];
    130  unsigned int valid_hooks;
    131  unsigned int num_entries;
    132  unsigned int size;
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134  unsigned int hook_entry[NF_INET_NUMHOOKS];
    135  unsigned int underflow[NF_INET_NUMHOOKS];
    136  unsigned int num_counters;
    137  struct xt_counters __user *counters;
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139  struct ipt_entry entries[0];
    140 };
    141 struct ipt_get_entries {
    142  char name[XT_TABLE_MAXNAMELEN];
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144  unsigned int size;
    145  struct ipt_entry entrytable[0];
    146 };
    147 static __inline__ struct xt_entry_target *
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149 ipt_get_target(struct ipt_entry *e)
    150 {
    151  return (void *)e + e->target_offset;
    152 }
    153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    154 #endif
    155