diff options
Diffstat (limited to 'include/net/flow.h')
| -rw-r--r-- | include/net/flow.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/include/net/flow.h b/include/net/flow.h index 04d89f763451..ddf5f3ca1720 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
| @@ -16,8 +16,8 @@ struct flowi { | |||
| 16 | 16 | ||
| 17 | union { | 17 | union { |
| 18 | struct { | 18 | struct { |
| 19 | __u32 daddr; | 19 | __be32 daddr; |
| 20 | __u32 saddr; | 20 | __be32 saddr; |
| 21 | __u32 fwmark; | 21 | __u32 fwmark; |
| 22 | __u8 tos; | 22 | __u8 tos; |
| 23 | __u8 scope; | 23 | __u8 scope; |
| @@ -26,6 +26,7 @@ struct flowi { | |||
| 26 | struct { | 26 | struct { |
| 27 | struct in6_addr daddr; | 27 | struct in6_addr daddr; |
| 28 | struct in6_addr saddr; | 28 | struct in6_addr saddr; |
| 29 | __u32 fwmark; | ||
| 29 | __u32 flowlabel; | 30 | __u32 flowlabel; |
| 30 | } ip6_u; | 31 | } ip6_u; |
| 31 | 32 | ||
| @@ -42,6 +43,7 @@ struct flowi { | |||
| 42 | #define fld_scope nl_u.dn_u.scope | 43 | #define fld_scope nl_u.dn_u.scope |
| 43 | #define fl6_dst nl_u.ip6_u.daddr | 44 | #define fl6_dst nl_u.ip6_u.daddr |
| 44 | #define fl6_src nl_u.ip6_u.saddr | 45 | #define fl6_src nl_u.ip6_u.saddr |
| 46 | #define fl6_fwmark nl_u.ip6_u.fwmark | ||
| 45 | #define fl6_flowlabel nl_u.ip6_u.flowlabel | 47 | #define fl6_flowlabel nl_u.ip6_u.flowlabel |
| 46 | #define fl4_dst nl_u.ip4_u.daddr | 48 | #define fl4_dst nl_u.ip4_u.daddr |
| 47 | #define fl4_src nl_u.ip4_u.saddr | 49 | #define fl4_src nl_u.ip4_u.saddr |
| @@ -54,8 +56,8 @@ struct flowi { | |||
| 54 | #define FLOWI_FLAG_MULTIPATHOLDROUTE 0x01 | 56 | #define FLOWI_FLAG_MULTIPATHOLDROUTE 0x01 |
| 55 | union { | 57 | union { |
| 56 | struct { | 58 | struct { |
| 57 | __u16 sport; | 59 | __be16 sport; |
| 58 | __u16 dport; | 60 | __be16 dport; |
| 59 | } ports; | 61 | } ports; |
| 60 | 62 | ||
| 61 | struct { | 63 | struct { |
| @@ -71,13 +73,23 @@ struct flowi { | |||
| 71 | __u8 objname[16]; /* Not zero terminated */ | 73 | __u8 objname[16]; /* Not zero terminated */ |
| 72 | } dnports; | 74 | } dnports; |
| 73 | 75 | ||
| 74 | __u32 spi; | 76 | __be32 spi; |
| 77 | |||
| 78 | #ifdef CONFIG_IPV6_MIP6 | ||
| 79 | struct { | ||
| 80 | __u8 type; | ||
| 81 | } mht; | ||
| 82 | #endif | ||
| 75 | } uli_u; | 83 | } uli_u; |
| 76 | #define fl_ip_sport uli_u.ports.sport | 84 | #define fl_ip_sport uli_u.ports.sport |
| 77 | #define fl_ip_dport uli_u.ports.dport | 85 | #define fl_ip_dport uli_u.ports.dport |
| 78 | #define fl_icmp_type uli_u.icmpt.type | 86 | #define fl_icmp_type uli_u.icmpt.type |
| 79 | #define fl_icmp_code uli_u.icmpt.code | 87 | #define fl_icmp_code uli_u.icmpt.code |
| 80 | #define fl_ipsec_spi uli_u.spi | 88 | #define fl_ipsec_spi uli_u.spi |
| 89 | #ifdef CONFIG_IPV6_MIP6 | ||
| 90 | #define fl_mh_type uli_u.mht.type | ||
| 91 | #endif | ||
| 92 | __u32 secid; /* used by xfrm; see secid.txt */ | ||
| 81 | } __attribute__((__aligned__(BITS_PER_LONG/8))); | 93 | } __attribute__((__aligned__(BITS_PER_LONG/8))); |
| 82 | 94 | ||
| 83 | #define FLOW_DIR_IN 0 | 95 | #define FLOW_DIR_IN 0 |
| @@ -85,10 +97,10 @@ struct flowi { | |||
| 85 | #define FLOW_DIR_FWD 2 | 97 | #define FLOW_DIR_FWD 2 |
| 86 | 98 | ||
| 87 | struct sock; | 99 | struct sock; |
| 88 | typedef void (*flow_resolve_t)(struct flowi *key, u32 sk_sid, u16 family, u8 dir, | 100 | typedef void (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir, |
| 89 | void **objp, atomic_t **obj_refp); | 101 | void **objp, atomic_t **obj_refp); |
| 90 | 102 | ||
| 91 | extern void *flow_cache_lookup(struct flowi *key, u32 sk_sid, u16 family, u8 dir, | 103 | extern void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir, |
| 92 | flow_resolve_t resolver); | 104 | flow_resolve_t resolver); |
| 93 | extern void flow_cache_flush(void); | 105 | extern void flow_cache_flush(void); |
| 94 | extern atomic_t flow_cache_genid; | 106 | extern atomic_t flow_cache_genid; |
