linux/net/ieee802154/6lowpan/reassembly.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*	6LoWPAN fragment reassembly
 *
 *	Authors:
 *	Alexander Aring		<[email protected]>
 *
 *	Based on: net/ipv6/reassembly.c
 */

#define pr_fmt(fmt)

#include <linux/net.h>
#include <linux/list.h>
#include <linux/netdevice.h>
#include <linux/random.h>
#include <linux/jhash.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/export.h>

#include <net/ieee802154_netdev.h>
#include <net/6lowpan.h>
#include <net/ipv6_frag.h>
#include <net/inet_frag.h>
#include <net/ip.h>

#include "6lowpan_i.h"

static const char lowpan_frags_cache_name[] =;

static struct inet_frags lowpan_frags;

static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *skb,
			     struct sk_buff *prev,  struct net_device *ldev);

static void lowpan_frag_init(struct inet_frag_queue *q, const void *a)
{}

static void lowpan_frag_expire(struct timer_list *t)
{}

static inline struct lowpan_frag_queue *
fq_find(struct net *net, const struct lowpan_802154_cb *cb,
	const struct ieee802154_addr *src,
	const struct ieee802154_addr *dst)
{}

static int lowpan_frag_queue(struct lowpan_frag_queue *fq,
			     struct sk_buff *skb, u8 frag_type)
{}

/*	Check if this packet is complete.
 *
 *	It is called with locked fq, and caller must check that
 *	queue is eligible for reassembly i.e. it is not COMPLETE,
 *	the last and the first frames arrived and all the bits are here.
 */
static int lowpan_frag_reasm(struct lowpan_frag_queue *fq, struct sk_buff *skb,
			     struct sk_buff *prev_tail, struct net_device *ldev)
{}

static int lowpan_frag_rx_handlers_result(struct sk_buff *skb,
					  lowpan_rx_result res)
{}

static lowpan_rx_result lowpan_frag_rx_h_iphc(struct sk_buff *skb)
{}

static int lowpan_invoke_frag_rx_handlers(struct sk_buff *skb)
{}

#define LOWPAN_FRAG_DGRAM_SIZE_HIGH_MASK
#define LOWPAN_FRAG_DGRAM_SIZE_HIGH_SHIFT

static int lowpan_get_cb(struct sk_buff *skb, u8 frag_type,
			 struct lowpan_802154_cb *cb)
{}

int lowpan_frag_rcv(struct sk_buff *skb, u8 frag_type)
{}

#ifdef CONFIG_SYSCTL

static struct ctl_table lowpan_frags_ns_ctl_table[] =;

/* secret interval has been deprecated */
static int lowpan_frags_secret_interval_unused;
static struct ctl_table lowpan_frags_ctl_table[] =;

static int __net_init lowpan_frags_ns_sysctl_register(struct net *net)
{}

static void __net_exit lowpan_frags_ns_sysctl_unregister(struct net *net)
{}

static struct ctl_table_header *lowpan_ctl_header;

static int __init lowpan_frags_sysctl_register(void)
{}

static void lowpan_frags_sysctl_unregister(void)
{}
#else
static inline int lowpan_frags_ns_sysctl_register(struct net *net)
{
	return 0;
}

static inline void lowpan_frags_ns_sysctl_unregister(struct net *net)
{
}

static inline int __init lowpan_frags_sysctl_register(void)
{
	return 0;
}

static inline void lowpan_frags_sysctl_unregister(void)
{
}
#endif

static int __net_init lowpan_frags_init_net(struct net *net)
{}

static void __net_exit lowpan_frags_pre_exit_net(struct net *net)
{}

static void __net_exit lowpan_frags_exit_net(struct net *net)
{}

static struct pernet_operations lowpan_frags_ops =;

static u32 lowpan_key_hashfn(const void *data, u32 len, u32 seed)
{}

static u32 lowpan_obj_hashfn(const void *data, u32 len, u32 seed)
{}

static int lowpan_obj_cmpfn(struct rhashtable_compare_arg *arg, const void *ptr)
{}

static const struct rhashtable_params lowpan_rhash_params =;

int __init lowpan_net_frag_init(void)
{}

void lowpan_net_frag_exit(void)
{}