895721ae71e1eb7e3937ccf668f7eedf2ee5dc61
1 #ifndef __IEEE802154_6LOWPAN_REASSEMBLY_H__
2 #define __IEEE802154_6LOWPAN_REASSEMBLY_H__
4 #include <net/inet_frag.h>
6 struct lowpan_create_arg
{
9 const struct ieee802154_addr_sa
*src
;
10 const struct ieee802154_addr_sa
*dst
;
13 /* Equivalent of ipv4 struct ip
15 struct lowpan_frag_queue
{
16 struct inet_frag_queue q
;
20 struct ieee802154_addr_sa saddr
;
21 struct ieee802154_addr_sa daddr
;
24 static inline u32
ieee802154_addr_hash(const struct ieee802154_addr_sa
*a
)
26 switch (a
->addr_type
) {
27 case IEEE802154_ADDR_LONG
:
28 return (__force u32
)((((u32
*)a
->hwaddr
))[0] ^
29 ((u32
*)(a
->hwaddr
))[1]);
30 case IEEE802154_ADDR_SHORT
:
31 return (__force u32
)(a
->short_addr
);
38 ieee802154_addr_addr_equal(const struct ieee802154_addr_sa
*a1
,
39 const struct ieee802154_addr_sa
*a2
)
41 if (a1
->pan_id
!= a2
->pan_id
)
44 if (a1
->addr_type
!= a2
->addr_type
)
47 switch (a1
->addr_type
) {
48 case IEEE802154_ADDR_LONG
:
49 if (memcmp(a1
->hwaddr
, a2
->hwaddr
, IEEE802154_ADDR_LEN
))
52 case IEEE802154_ADDR_SHORT
:
53 if (a1
->short_addr
!= a2
->short_addr
)
63 int lowpan_frag_rcv(struct sk_buff
*skb
, const u8 frag_type
);
64 void lowpan_net_frag_exit(void);
65 int lowpan_net_frag_init(void);
67 #endif /* __IEEE802154_6LOWPAN_REASSEMBLY_H__ */
This page took 0.03128 seconds and 4 git commands to generate.