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  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _IP_NAT_H
     13 #define _IP_NAT_H
     14 #include <linux/netfilter_ipv4.h>
     15 #include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
     16 
     17 #define IP_NAT_MAPPING_TYPE_MAX_NAMELEN 16
     18 
     19 enum ip_nat_manip_type
     20 {
     21  IP_NAT_MANIP_SRC,
     22  IP_NAT_MANIP_DST
     23 };
     24 
     25 #define HOOK2MANIP(hooknum) ((hooknum) != NF_IP_POST_ROUTING && (hooknum) != NF_IP_LOCAL_IN)
     26 
     27 #define IP_NAT_RANGE_MAP_IPS 1
     28 #define IP_NAT_RANGE_PROTO_SPECIFIED 2
     29 
     30 struct ip_nat_seq {
     31 
     32  u_int32_t correction_pos;
     33 
     34  int16_t offset_before, offset_after;
     35 };
     36 
     37 struct ip_nat_range
     38 {
     39 
     40  unsigned int flags;
     41 
     42  u_int32_t min_ip, max_ip;
     43 
     44  union ip_conntrack_manip_proto min, max;
     45 };
     46 
     47 struct ip_nat_multi_range_compat
     48 {
     49  unsigned int rangesize;
     50 
     51  struct ip_nat_range range[1];
     52 };
     53 
     54 #define ip_nat_multi_range ip_nat_multi_range_compat
     55 #endif
     56