aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-11 18:36:42 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 18:08:45 -0500
commit08704bcbf022786532b5f188935ab6619906049f (patch)
tree0fdf786d0e5aad96e68055668971bdff90be496a
parent806566cc78390b1565ded91712cd28619cea5f57 (diff)
net: Create union flowi_uli
This will be used when we have seperate flowi types. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/flow.h48
1 files changed, 25 insertions, 23 deletions
diff --git a/include/net/flow.h b/include/net/flow.h
index 775968716b47..541ac13f245a 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -24,6 +24,30 @@ struct flowi_common {
24 __u32 flowic_secid; 24 __u32 flowic_secid;
25}; 25};
26 26
27union flowi_uli {
28 struct {
29 __be16 sport;
30 __be16 dport;
31 } ports;
32
33 struct {
34 __u8 type;
35 __u8 code;
36 } icmpt;
37
38 struct {
39 __le16 sport;
40 __le16 dport;
41 } dnports;
42
43 __be32 spi;
44 __be32 gre_key;
45
46 struct {
47 __u8 type;
48 } mht;
49};
50
27struct flowi { 51struct flowi {
28 struct flowi_common __fl_common; 52 struct flowi_common __fl_common;
29#define flowi_oif __fl_common.flowic_oif 53#define flowi_oif __fl_common.flowic_oif
@@ -64,29 +88,7 @@ struct flowi {
64#define fl4_tos flowi_tos 88#define fl4_tos flowi_tos
65#define fl4_scope flowi_scope 89#define fl4_scope flowi_scope
66 90
67 union { 91 union flowi_uli uli_u;
68 struct {
69 __be16 sport;
70 __be16 dport;
71 } ports;
72
73 struct {
74 __u8 type;
75 __u8 code;
76 } icmpt;
77
78 struct {
79 __le16 sport;
80 __le16 dport;
81 } dnports;
82
83 __be32 spi;
84 __be32 gre_key;
85
86 struct {
87 __u8 type;
88 } mht;
89 } uli_u;
90#define fl_ip_sport uli_u.ports.sport 92#define fl_ip_sport uli_u.ports.sport
91#define fl_ip_dport uli_u.ports.dport 93#define fl_ip_dport uli_u.ports.dport
92#define fl_icmp_type uli_u.icmpt.type 94#define fl_icmp_type uli_u.icmpt.type