diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-11-28 00:22:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-28 19:09:07 -0500 |
commit | 0744dd00c1b1be99a25b62b1b48df440e82e57e0 (patch) | |
tree | 94bff02f61657c4b02709f472dcb56f9dc927a18 /include/net/flow_keys.h | |
parent | de0396f4003a24a57875b35f2996fdaa47bc1d0d (diff) |
net: introduce skb_flow_dissect()
We use at least two flow dissectors in network stack, with known
limitations and code duplication.
Introduce skb_flow_dissect() to factorize this, highly inspired from
existing dissector from __skb_get_rxhash()
Note : We extensively use skb_header_pointer(), this permits us to not
touch skb at all.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/flow_keys.h')
-rw-r--r-- | include/net/flow_keys.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h new file mode 100644 index 000000000000..e4cb28526563 --- /dev/null +++ b/include/net/flow_keys.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _NET_FLOW_KEYS_H | ||
2 | #define _NET_FLOW_KEYS_H | ||
3 | |||
4 | struct flow_keys { | ||
5 | __be32 src; | ||
6 | __be32 dst; | ||
7 | union { | ||
8 | __be32 ports; | ||
9 | __be16 port16[2]; | ||
10 | }; | ||
11 | u8 ip_proto; | ||
12 | }; | ||
13 | |||
14 | extern bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow); | ||
15 | #endif | ||