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 13#define NF_NAT_RANGE_PROTO_RANDOM_ALL \ 14 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) 15 16#define NF_NAT_RANGE_MASK \ 17 (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \ 18 NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ 19 NF_NAT_RANGE_PROTO_RANDOM_FULLY) 20 21struct nf_nat_ipv4_range { 22 unsigned int flags; 23 __be32 min_ip; 24 __be32 max_ip; 25 union nf_conntrack_man_proto min; 26 union nf_conntrack_man_proto max; 27}; 28 29struct nf_nat_ipv4_multi_range_compat { 30 unsigned int rangesize; 31 struct nf_nat_ipv4_range range[1]; 32}; 33 34struct nf_nat_range { 35 unsigned int flags; 36 union nf_inet_addr min_addr; 37 union nf_inet_addr max_addr; 38 union nf_conntrack_man_proto min_proto; 39 union nf_conntrack_man_proto max_proto; 40}; 41 42#endif /* _NETFILTER_NF_NAT_H */ 43