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


xt_policy.h
01: #ifndef _XT_POLICY_H
02: #define _XT_POLICY_H
03: 
04: #include <linux/types.h>
05: 
06: #define XT_POLICY_MAX_ELEM      4
07: 
08: enum xt_policy_flags {
09:         XT_POLICY_MATCH_IN      = 0x1,
10:         XT_POLICY_MATCH_OUT     = 0x2,
11:         XT_POLICY_MATCH_NONE    = 0x4,
12:         XT_POLICY_MATCH_STRICT  = 0x8,
13: };
14: 
15: enum xt_policy_modes {
16:         XT_POLICY_MODE_TRANSPORT,
17:         XT_POLICY_MODE_TUNNEL
18: };
19: 
20: struct xt_policy_spec {
21:         __u8    saddr:1,
22:                         daddr:1,
23:                         proto:1,
24:                         mode:1,
25:                         spi:1,
26:                         reqid:1;
27: };
28: 
29: union xt_policy_addr {
30:         struct in_addr  a4;
31:         struct in6_addr a6;
32: };
33: 
34: struct xt_policy_elem {
35:         union {
36:                 struct {
37:                         union xt_policy_addr saddr;
38:                         union xt_policy_addr smask;
39:                         union xt_policy_addr daddr;
40:                         union xt_policy_addr dmask;
41:                 };
42:         };
43:         __be32                  spi;
44:         __u32           reqid;
45:         __u8            proto;
46:         __u8            mode;
47: 
48:         struct xt_policy_spec   match;
49:         struct xt_policy_spec   invert;
50: };
51: 
52: struct xt_policy_info {
53:         struct xt_policy_elem pol[XT_POLICY_MAX_ELEM];
54:         __u16 flags;
55:         __u16 len;
56: };
57: 
58: #endif /* _XT_POLICY_H */
59: 


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