summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 00:36:42 +0100
committerDavid S. Miller <davem@davemloft.net>2011-03-13 00:08:45 +0100
commit08704bcbf022786532b5f188935ab6619906049f (patch)
tree0fdf786d0e5aad96e68055668971bdff90be496a /include/net
parentnet: Create struct flowi_common (diff)
downloadlinux-08704bcbf022786532b5f188935ab6619906049f.tar.xz
linux-08704bcbf022786532b5f188935ab6619906049f.zip
net: Create union flowi_uli
This will be used when we have seperate flowi types. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/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 {
__u32 flowic_secid;
};
+union flowi_uli {
+ struct {
+ __be16 sport;
+ __be16 dport;
+ } ports;
+
+ struct {
+ __u8 type;
+ __u8 code;
+ } icmpt;
+
+ struct {
+ __le16 sport;
+ __le16 dport;
+ } dnports;
+
+ __be32 spi;
+ __be32 gre_key;
+
+ struct {
+ __u8 type;
+ } mht;
+};
+
struct flowi {
struct flowi_common __fl_common;
#define flowi_oif __fl_common.flowic_oif
@@ -64,29 +88,7 @@ struct flowi {
#define fl4_tos flowi_tos
#define fl4_scope flowi_scope
- union {
- struct {
- __be16 sport;
- __be16 dport;
- } ports;
-
- struct {
- __u8 type;
- __u8 code;
- } icmpt;
-
- struct {
- __le16 sport;
- __le16 dport;
- } dnports;
-
- __be32 spi;
- __be32 gre_key;
-
- struct {
- __u8 type;
- } mht;
- } uli_u;
+ union flowi_uli uli_u;
#define fl_ip_sport uli_u.ports.sport
#define fl_ip_dport uli_u.ports.dport
#define fl_icmp_type uli_u.icmpt.type