#define pr_fmt(fmt) …
#include <linux/compiler.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/jiffies.h>
#include <linux/skbuff.h>
#include <linux/list.h>
#include <linux/ip.h>
#include <linux/icmp.h>
#include <linux/netdevice.h>
#include <linux/jhash.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <net/route.h>
#include <net/dst.h>
#include <net/sock.h>
#include <net/ip.h>
#include <net/icmp.h>
#include <net/checksum.h>
#include <net/inetpeer.h>
#include <net/inet_frag.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/inet.h>
#include <linux/netfilter_ipv4.h>
#include <net/inet_ecn.h>
#include <net/l3mdev.h>
static const char ip_frag_cache_name[] = …;
struct ipq { … };
static u8 ip4_frag_ecn(u8 tos)
{ … }
static struct inet_frags ip4_frags;
static int ip_frag_reasm(struct ipq *qp, struct sk_buff *skb,
struct sk_buff *prev_tail, struct net_device *dev);
static void ip4_frag_init(struct inet_frag_queue *q, const void *a)
{ … }
static void ip4_frag_free(struct inet_frag_queue *q)
{ … }
static void ipq_put(struct ipq *ipq)
{ … }
static void ipq_kill(struct ipq *ipq)
{ … }
static bool frag_expire_skip_icmp(u32 user)
{ … }
static void ip_expire(struct timer_list *t)
{ … }
static struct ipq *ip_find(struct net *net, struct iphdr *iph,
u32 user, int vif)
{ … }
static int ip_frag_too_far(struct ipq *qp)
{ … }
static int ip_frag_reinit(struct ipq *qp)
{ … }
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
{ … }
static bool ip_frag_coalesce_ok(const struct ipq *qp)
{ … }
static int ip_frag_reasm(struct ipq *qp, struct sk_buff *skb,
struct sk_buff *prev_tail, struct net_device *dev)
{ … }
int ip_defrag(struct net *net, struct sk_buff *skb, u32 user)
{ … }
EXPORT_SYMBOL(…);
struct sk_buff *ip_check_defrag(struct net *net, struct sk_buff *skb, u32 user)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_SYSCTL
static int dist_min;
static struct ctl_table ip4_frags_ns_ctl_table[] = …;
static int ip4_frags_secret_interval_unused;
static struct ctl_table ip4_frags_ctl_table[] = …;
static int __net_init ip4_frags_ns_ctl_register(struct net *net)
{ … }
static void __net_exit ip4_frags_ns_ctl_unregister(struct net *net)
{ … }
static void __init ip4_frags_ctl_register(void)
{ … }
#else
static int ip4_frags_ns_ctl_register(struct net *net)
{
return 0;
}
static void ip4_frags_ns_ctl_unregister(struct net *net)
{
}
static void __init ip4_frags_ctl_register(void)
{
}
#endif
static int __net_init ipv4_frags_init_net(struct net *net)
{ … }
static void __net_exit ipv4_frags_pre_exit_net(struct net *net)
{ … }
static void __net_exit ipv4_frags_exit_net(struct net *net)
{ … }
static struct pernet_operations ip4_frags_ops = …;
static u32 ip4_key_hashfn(const void *data, u32 len, u32 seed)
{ … }
static u32 ip4_obj_hashfn(const void *data, u32 len, u32 seed)
{ … }
static int ip4_obj_cmpfn(struct rhashtable_compare_arg *arg, const void *ptr)
{ … }
static const struct rhashtable_params ip4_rhash_params = …;
void __init ipfrag_init(void)
{ … }