Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v3.17-rc6 33 lines 1.0 kB view raw
1#ifndef _NET_FLOW_KEYS_H 2#define _NET_FLOW_KEYS_H 3 4/* struct flow_keys: 5 * @src: source ip address in case of IPv4 6 * For IPv6 it contains 32bit hash of src address 7 * @dst: destination ip address in case of IPv4 8 * For IPv6 it contains 32bit hash of dst address 9 * @ports: port numbers of Transport header 10 * port16[0]: src port number 11 * port16[1]: dst port number 12 * @thoff: Transport header offset 13 * @n_proto: Network header protocol (eg. IPv4/IPv6) 14 * @ip_proto: Transport header protocol (eg. TCP/UDP) 15 * All the members, except thoff, are in network byte order. 16 */ 17struct flow_keys { 18 /* (src,dst) must be grouped, in the same way than in IP header */ 19 __be32 src; 20 __be32 dst; 21 union { 22 __be32 ports; 23 __be16 port16[2]; 24 }; 25 u16 thoff; 26 u16 n_proto; 27 u8 ip_proto; 28}; 29 30bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow); 31__be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto); 32u32 flow_hash_from_keys(struct flow_keys *keys); 33#endif