Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[deliverable/linux.git] / net / ieee802154 / reassembly.h
1 #ifndef __IEEE802154_6LOWPAN_REASSEMBLY_H__
2 #define __IEEE802154_6LOWPAN_REASSEMBLY_H__
3
4 #include <net/inet_frag.h>
5
6 struct lowpan_create_arg {
7 u16 tag;
8 u16 d_size;
9 const struct ieee802154_addr *src;
10 const struct ieee802154_addr *dst;
11 };
12
13 /* Equivalent of ipv4 struct ip
14 */
15 struct lowpan_frag_queue {
16 struct inet_frag_queue q;
17
18 u16 tag;
19 u16 d_size;
20 struct ieee802154_addr saddr;
21 struct ieee802154_addr daddr;
22 };
23
24 static inline u32 ieee802154_addr_hash(const struct ieee802154_addr *a)
25 {
26 switch (a->mode) {
27 case IEEE802154_ADDR_LONG:
28 return (((__force u64)a->extended_addr) >> 32) ^
29 (((__force u64)a->extended_addr) & 0xffffffff);
30 case IEEE802154_ADDR_SHORT:
31 return (__force u32)(a->short_addr);
32 default:
33 return 0;
34 }
35 }
36
37 int lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type);
38 void lowpan_net_frag_exit(void);
39 int lowpan_net_frag_init(void);
40
41 #endif /* __IEEE802154_6LOWPAN_REASSEMBLY_H__ */
This page took 0.030363 seconds and 5 git commands to generate.