1 #ifndef _NETFILTER_NF_NAT_H 2 #define _NETFILTER_NF_NAT_H 3 4 #include <linux/netfilter.h> 5 #include <linux/netfilter/nf_conntrack_tuple_common.h> 6 7 #define NF_NAT_RANGE_MAP_IPS (1 << 0) 8 #define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1) 9 #define NF_NAT_RANGE_PROTO_RANDOM (1 << 2) 10 #define NF_NAT_RANGE_PERSISTENT (1 << 3) 11 #define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4) 12 #define NF_NAT_RANGE_PROTO_OFFSET (1 << 5) 13 14 #define NF_NAT_RANGE_PROTO_RANDOM_ALL \ 15 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) 16 17 #define NF_NAT_RANGE_MASK \ 18 (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \ 19 NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ 20 NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET) 21 22 struct nf_nat_ipv4_range { 23 unsigned int flags; 24 __be32 min_ip; 25 __be32 max_ip; 26 union nf_conntrack_man_proto min; 27 union nf_conntrack_man_proto max; 28 }; 29 30 struct nf_nat_ipv4_multi_range_compat { 31 unsigned int rangesize; 32 struct nf_nat_ipv4_range range[1]; 33 }; 34 35 struct nf_nat_range { 36 unsigned int flags; 37 union nf_inet_addr min_addr; 38 union nf_inet_addr max_addr; 39 union nf_conntrack_man_proto min_proto; 40 union nf_conntrack_man_proto max_proto; 41 }; 42 43 struct nf_nat_range2 { 44 unsigned int flags; 45 union nf_inet_addr min_addr; 46 union nf_inet_addr max_addr; 47 union nf_conntrack_man_proto min_proto; 48 union nf_conntrack_man_proto max_proto; 49 union nf_conntrack_man_proto base_proto; 50 }; 51 52 #endif /* _NETFILTER_NF_NAT_H */ 53