~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/ieee802154/6lowpan/6lowpan_i.h

Version: ~ [ linux-5.12-rc7 ] ~ [ linux-5.11.13 ] ~ [ linux-5.10.29 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.111 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.186 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.230 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.266 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.266 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __IEEE802154_6LOWPAN_I_H__
  2 #define __IEEE802154_6LOWPAN_I_H__
  3 
  4 #include <linux/list.h>
  5 
  6 #include <net/ieee802154_netdev.h>
  7 #include <net/inet_frag.h>
  8 #include <net/6lowpan.h>
  9 
 10 typedef unsigned __bitwise__ lowpan_rx_result;
 11 #define RX_CONTINUE             ((__force lowpan_rx_result) 0u)
 12 #define RX_DROP_UNUSABLE        ((__force lowpan_rx_result) 1u)
 13 #define RX_DROP                 ((__force lowpan_rx_result) 2u)
 14 #define RX_QUEUED               ((__force lowpan_rx_result) 3u)
 15 
 16 #define LOWPAN_DISPATCH_FRAG1           0xc0
 17 #define LOWPAN_DISPATCH_FRAGN           0xe0
 18 
 19 struct lowpan_create_arg {
 20         u16 tag;
 21         u16 d_size;
 22         const struct ieee802154_addr *src;
 23         const struct ieee802154_addr *dst;
 24 };
 25 
 26 /* Equivalent of ipv4 struct ip
 27  */
 28 struct lowpan_frag_queue {
 29         struct inet_frag_queue  q;
 30 
 31         u16                     tag;
 32         u16                     d_size;
 33         struct ieee802154_addr  saddr;
 34         struct ieee802154_addr  daddr;
 35 };
 36 
 37 static inline u32 ieee802154_addr_hash(const struct ieee802154_addr *a)
 38 {
 39         switch (a->mode) {
 40         case IEEE802154_ADDR_LONG:
 41                 return (((__force u64)a->extended_addr) >> 32) ^
 42                         (((__force u64)a->extended_addr) & 0xffffffff);
 43         case IEEE802154_ADDR_SHORT:
 44                 return (__force u32)(a->short_addr);
 45         default:
 46                 return 0;
 47         }
 48 }
 49 
 50 /* private device info */
 51 struct lowpan_dev_info {
 52         struct net_device       *wdev; /* wpan device ptr */
 53         u16                     fragment_tag;
 54 };
 55 
 56 static inline struct
 57 lowpan_dev_info *lowpan_dev_info(const struct net_device *dev)
 58 {
 59         return (struct lowpan_dev_info *)lowpan_priv(dev)->priv;
 60 }
 61 
 62 int lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type);
 63 void lowpan_net_frag_exit(void);
 64 int lowpan_net_frag_init(void);
 65 
 66 void lowpan_rx_init(void);
 67 void lowpan_rx_exit(void);
 68 
 69 int lowpan_header_create(struct sk_buff *skb, struct net_device *dev,
 70                          unsigned short type, const void *_daddr,
 71                          const void *_saddr, unsigned int len);
 72 netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev);
 73 
 74 int lowpan_iphc_decompress(struct sk_buff *skb);
 75 lowpan_rx_result lowpan_rx_h_ipv6(struct sk_buff *skb);
 76 
 77 #endif /* __IEEE802154_6LOWPAN_I_H__ */
 78 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp