18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __IEEE802154_6LOWPAN_I_H__ 38c2ecf20Sopenharmony_ci#define __IEEE802154_6LOWPAN_I_H__ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/list.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <net/ieee802154_netdev.h> 88c2ecf20Sopenharmony_ci#include <net/inet_frag.h> 98c2ecf20Sopenharmony_ci#include <net/6lowpan.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_citypedef unsigned __bitwise lowpan_rx_result; 128c2ecf20Sopenharmony_ci#define RX_CONTINUE ((__force lowpan_rx_result) 0u) 138c2ecf20Sopenharmony_ci#define RX_DROP_UNUSABLE ((__force lowpan_rx_result) 1u) 148c2ecf20Sopenharmony_ci#define RX_DROP ((__force lowpan_rx_result) 2u) 158c2ecf20Sopenharmony_ci#define RX_QUEUED ((__force lowpan_rx_result) 3u) 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define LOWPAN_DISPATCH_FRAG1 0xc0 188c2ecf20Sopenharmony_ci#define LOWPAN_DISPATCH_FRAGN 0xe0 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cistruct frag_lowpan_compare_key { 218c2ecf20Sopenharmony_ci u16 tag; 228c2ecf20Sopenharmony_ci u16 d_size; 238c2ecf20Sopenharmony_ci struct ieee802154_addr src; 248c2ecf20Sopenharmony_ci struct ieee802154_addr dst; 258c2ecf20Sopenharmony_ci}; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* Equivalent of ipv4 struct ipq 288c2ecf20Sopenharmony_ci */ 298c2ecf20Sopenharmony_cistruct lowpan_frag_queue { 308c2ecf20Sopenharmony_ci struct inet_frag_queue q; 318c2ecf20Sopenharmony_ci}; 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ciint lowpan_frag_rcv(struct sk_buff *skb, const u8 frag_type); 348c2ecf20Sopenharmony_civoid lowpan_net_frag_exit(void); 358c2ecf20Sopenharmony_ciint lowpan_net_frag_init(void); 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_civoid lowpan_rx_init(void); 388c2ecf20Sopenharmony_civoid lowpan_rx_exit(void); 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ciint lowpan_header_create(struct sk_buff *skb, struct net_device *dev, 418c2ecf20Sopenharmony_ci unsigned short type, const void *_daddr, 428c2ecf20Sopenharmony_ci const void *_saddr, unsigned int len); 438c2ecf20Sopenharmony_cinetdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *dev); 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciint lowpan_iphc_decompress(struct sk_buff *skb); 468c2ecf20Sopenharmony_cilowpan_rx_result lowpan_rx_h_ipv6(struct sk_buff *skb); 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#endif /* __IEEE802154_6LOWPAN_I_H__ */ 49