6lowpan_i.h 1.3 KB

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