diff options
Diffstat (limited to 'include/net/flow.h')
-rw-r--r-- | include/net/flow.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/net/flow.h b/include/net/flow.h index 7fe5a0f9483a..c6d5fe5ec1bf 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -26,8 +26,8 @@ struct flowi_common { | |||
26 | 26 | ||
27 | union flowi_uli { | 27 | union flowi_uli { |
28 | struct { | 28 | struct { |
29 | __be16 sport; | ||
30 | __be16 dport; | 29 | __be16 dport; |
30 | __be16 sport; | ||
31 | } ports; | 31 | } ports; |
32 | 32 | ||
33 | struct { | 33 | struct { |
@@ -36,8 +36,8 @@ union flowi_uli { | |||
36 | } icmpt; | 36 | } icmpt; |
37 | 37 | ||
38 | struct { | 38 | struct { |
39 | __le16 sport; | ||
40 | __le16 dport; | 39 | __le16 dport; |
40 | __le16 sport; | ||
41 | } dnports; | 41 | } dnports; |
42 | 42 | ||
43 | __be32 spi; | 43 | __be32 spi; |
@@ -70,6 +70,27 @@ struct flowi4 { | |||
70 | #define fl4_gre_key uli.gre_key | 70 | #define fl4_gre_key uli.gre_key |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static inline void flowi4_init_output(struct flowi4 *fl4, int oif, | ||
74 | __u32 mark, __u8 tos, __u8 scope, | ||
75 | __u8 proto, __u8 flags, | ||
76 | __be32 daddr, __be32 saddr, | ||
77 | __be16 dport, __be32 sport) | ||
78 | { | ||
79 | fl4->flowi4_oif = oif; | ||
80 | fl4->flowi4_iif = 0; | ||
81 | fl4->flowi4_mark = mark; | ||
82 | fl4->flowi4_tos = tos; | ||
83 | fl4->flowi4_scope = scope; | ||
84 | fl4->flowi4_proto = proto; | ||
85 | fl4->flowi4_flags = flags; | ||
86 | fl4->flowi4_secid = 0; | ||
87 | fl4->daddr = daddr; | ||
88 | fl4->saddr = saddr; | ||
89 | fl4->fl4_dport = dport; | ||
90 | fl4->fl4_sport = sport; | ||
91 | } | ||
92 | |||
93 | |||
73 | struct flowi6 { | 94 | struct flowi6 { |
74 | struct flowi_common __fl_common; | 95 | struct flowi_common __fl_common; |
75 | #define flowi6_oif __fl_common.flowic_oif | 96 | #define flowi6_oif __fl_common.flowic_oif |