Eric Dumazet | 0744dd0 | 2011-11-28 05:22:18 +0000 | [diff] [blame] | 1 | #ifndef _NET_FLOW_KEYS_H |
| 2 | #define _NET_FLOW_KEYS_H |
| 3 | |
| 4 | struct flow_keys { |
Eric Dumazet | 4d77d2b | 2011-11-28 20:30:35 +0000 | [diff] [blame] | 5 | /* (src,dst) must be grouped, in the same way than in IP header */ |
Eric Dumazet | 0744dd0 | 2011-11-28 05:22:18 +0000 | [diff] [blame] | 6 | __be32 src; |
| 7 | __be32 dst; |
| 8 | union { |
| 9 | __be32 ports; |
| 10 | __be16 port16[2]; |
| 11 | }; |
Daniel Borkmann | 8ed7816 | 2013-03-19 06:39:29 +0000 | [diff] [blame] | 12 | u16 thoff; |
Eric Dumazet | 0744dd0 | 2011-11-28 05:22:18 +0000 | [diff] [blame] | 13 | u8 ip_proto; |
| 14 | }; |
| 15 | |
Joe Perches | 4787342 | 2013-09-20 11:23:24 -0700 | [diff] [blame] | 16 | bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow); |
Nikolay Aleksandrov | 357afe9 | 2013-10-02 13:39:24 +0200 | [diff] [blame] | 17 | __be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto); |
Eric Dumazet | 0744dd0 | 2011-11-28 05:22:18 +0000 | [diff] [blame] | 18 | #endif |