#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysctl.h>
#include <linux/spinlock.h>
#include <linux/skbuff.h>
#include <linux/dccp.h>
#include <linux/slab.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
#include <linux/netfilter/nfnetlink_conntrack.h>
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_l4proto.h>
#include <net/netfilter/nf_conntrack_ecache.h>
#include <net/netfilter/nf_conntrack_timeout.h>
#include <net/netfilter/nf_log.h>
#define DCCP_MSL …
#ifdef CONFIG_NF_CONNTRACK_PROCFS
static const char * const dccp_state_names[] = …;
#endif
#define sNO …
#define sRQ …
#define sRS …
#define sPO …
#define sOP …
#define sCR …
#define sCG …
#define sTW …
#define sIG …
#define sIV …
static const u_int8_t
dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] = …;
static noinline bool
dccp_new(struct nf_conn *ct, const struct sk_buff *skb,
const struct dccp_hdr *dh,
const struct nf_hook_state *hook_state)
{ … }
static u64 dccp_ack_seq(const struct dccp_hdr *dh)
{ … }
static bool dccp_error(const struct dccp_hdr *dh,
struct sk_buff *skb, unsigned int dataoff,
const struct nf_hook_state *state)
{ … }
struct nf_conntrack_dccp_buf { … };
static struct dccp_hdr *
dccp_header_pointer(const struct sk_buff *skb, int offset, const struct dccp_hdr *dh,
struct nf_conntrack_dccp_buf *buf)
{ … }
int nf_conntrack_dccp_packet(struct nf_conn *ct, struct sk_buff *skb,
unsigned int dataoff,
enum ip_conntrack_info ctinfo,
const struct nf_hook_state *state)
{ … }
static bool dccp_can_early_drop(const struct nf_conn *ct)
{ … }
#ifdef CONFIG_NF_CONNTRACK_PROCFS
static void dccp_print_conntrack(struct seq_file *s, struct nf_conn *ct)
{ … }
#endif
#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
static int dccp_to_nlattr(struct sk_buff *skb, struct nlattr *nla,
struct nf_conn *ct, bool destroy)
{ … }
static const struct nla_policy dccp_nla_policy[CTA_PROTOINFO_DCCP_MAX + 1] = …;
#define DCCP_NLATTR_SIZE …
static int nlattr_to_dccp(struct nlattr *cda[], struct nf_conn *ct)
{ … }
#endif
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_cttimeout.h>
static int dccp_timeout_nlattr_to_obj(struct nlattr *tb[],
struct net *net, void *data)
{ … }
static int
dccp_timeout_obj_to_nlattr(struct sk_buff *skb, const void *data)
{ … }
static const struct nla_policy
dccp_timeout_nla_policy[CTA_TIMEOUT_DCCP_MAX+1] = …;
#endif
void nf_conntrack_dccp_init_net(struct net *net)
{ … }
const struct nf_conntrack_l4proto nf_conntrack_l4proto_dccp = …;