6lowpan_i.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __IEEE802154_6LOWPAN_I_H__
  3. #define __IEEE802154_6LOWPAN_I_H__
  4. #include <linux/list.h>
  5. #include <net/ieee802154_netdev.h>
  6. #include <net/inet_frag.h>
  7. #include <net/6lowpan.h>
  8. typedef unsigned __bitwise lowpan_rx_result;
  9. #define RX_CONTINUE ((__force lowpan_rx_result) 0u)
  10. #define RX_DROP_UNUSABLE ((__force lowpan_rx_result) 1u)
  11. #define RX_DROP ((__force lowpan_rx_result) 2u)
  12. #define RX_QUEUED ((__force lowpan_rx_result) 3u)
  13. #define LOWPAN_DISPATCH_FRAG1 0xc0
  14. #define LOWPAN_DISPATCH_FRAGN 0xe0
  15. struct frag_lowpan_compare_key {
  16. u16 tag;
  17. u16 d_size;
  18. struct ieee802154_addr src;
  19. struct ieee802154_addr dst;
  20. };
  21. /* Equivalent of ipv4 struct ipq
  22. */
  23. struct lowpan_frag_queue {
  24. struct inet_frag_queue q;
  25. };
  26. int lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type);
  27. void lowpan_net_frag_exit(void);
  28. int lowpan_net_frag_init(void);
  29. void lowpan_rx_init(void);
  30. void lowpan_rx_exit(void);
  31. int lowpan_header_create(struct sk_buff *skb, struct net_device *dev,
  32. unsigned short type, const void *_daddr,
  33. const void *_saddr, unsigned int len);
  34. netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev);
  35. int lowpan_iphc_decompress(struct sk_buff *skb);
  36. lowpan_rx_result lowpan_rx_h_ipv6(struct sk_buff *skb);
  37. #endif /* __IEEE802154_6LOWPAN_I_H__ */