Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


nf_nat.h
01: #ifndef _LINUX_NF_NAT_H
02: #define _LINUX_NF_NAT_H
03: 
04: #include <linux/types.h>
05: 
06: #define IP_NAT_RANGE_MAP_IPS 1
07: #define IP_NAT_RANGE_PROTO_SPECIFIED 2
08: #define IP_NAT_RANGE_PROTO_RANDOM 4
09: #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: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/