linux/include/net/flow_keys.h
Eric Dumazet 0744dd00c1 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>
2011-11-28 19:09:07 -05:00

16 lines
251 B
C

#ifndef _NET_FLOW_KEYS_H
#define _NET_FLOW_KEYS_H
struct flow_keys {
__be32 src;
__be32 dst;
union {
__be32 ports;
__be16 port16[2];
};
u8 ip_proto;
};
extern bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow);
#endif