1 #ifndef _LINUX_NF_NAT_H 2 #define _LINUX_NF_NAT_H 3 4 #include <linux/types.h> 5 6 #define IP_NAT_RANGE_MAP_IPS 1 7 #define IP_NAT_RANGE_PROTO_SPECIFIED 2 8 #define IP_NAT_RANGE_PROTO_RANDOM 4 9 #define IP_NAT_RANGE_PERSISTENT 8 10 11 /* The protocol-specific manipulable parts of the tuple. */ 12 union nf_conntrack_man_proto { 13 /* Add other protocols here. */ 14 __be16 all; 15 16 struct { 17 __be16 port; 18 } tcp; 19 struct { 20 __be16 port; 21 } udp; 22 struct { 23 __be16 id; 24 } icmp; 25 struct { 26 __be16 port; 27 } dccp; 28 struct { 29 __be16 port; 30 } sctp; 31 struct { 32 __be16 key; /* GRE key is 32bit, PPtP only uses 16bit */ 33 } gre; 34 }; 35 36 /* Single range specification. */ 37 struct nf_nat_range { 38 /* Set to OR of flags above. */ 39 unsigned int flags; 40 41 /* Inclusive: network order. */ 42 __be32 min_ip, max_ip; 43 44 /* Inclusive: network order */ 45 union nf_conntrack_man_proto min, max; 46 }; 47 48 /* For backwards compat: don't use in modern code. */ 49 struct nf_nat_multi_range_compat { 50 unsigned int rangesize; /* Must be 1. */ 51 52 /* hangs off end. */ 53 struct nf_nat_range range[1]; 54 }; 55 56 #define nf_nat_multi_range nf_nat_multi_range_compat 57 58 #endif 59