linux/net/dccp/ipv6.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	DCCP over IPv6
 *	Linux INET6 implementation
 *
 *	Based on net/dccp6/ipv6.c
 *
 *	Arnaldo Carvalho de Melo <[email protected]>
 */

#include <linux/module.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/xfrm.h>
#include <linux/string.h>

#include <net/addrconf.h>
#include <net/inet_common.h>
#include <net/inet_hashtables.h>
#include <net/inet_sock.h>
#include <net/inet6_connection_sock.h>
#include <net/inet6_hashtables.h>
#include <net/ip6_route.h>
#include <net/ipv6.h>
#include <net/protocol.h>
#include <net/transp_v6.h>
#include <net/ip6_checksum.h>
#include <net/xfrm.h>
#include <net/secure_seq.h>
#include <net/netns/generic.h>
#include <net/sock.h>
#include <net/rstreason.h>

#include "dccp.h"
#include "ipv6.h"
#include "feat.h"

struct dccp_v6_pernet {};

static unsigned int dccp_v6_pernet_id __read_mostly;

/* The per-net v6_ctl_sk is used for sending RSTs and ACKs */

static const struct inet_connection_sock_af_ops dccp_ipv6_mapped;
static const struct inet_connection_sock_af_ops dccp_ipv6_af_ops;

/* add pseudo-header to DCCP checksum stored in skb->csum */
static inline __sum16 dccp_v6_csum_finish(struct sk_buff *skb,
				      const struct in6_addr *saddr,
				      const struct in6_addr *daddr)
{}

static inline void dccp_v6_send_check(struct sock *sk, struct sk_buff *skb)
{}

static inline __u64 dccp_v6_init_sequence(struct sk_buff *skb)
{}

static int dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
			u8 type, u8 code, int offset, __be32 info)
{}


static int dccp_v6_send_response(const struct sock *sk, struct request_sock *req)
{}

static void dccp_v6_reqsk_destructor(struct request_sock *req)
{}

static void dccp_v6_ctl_send_reset(const struct sock *sk, struct sk_buff *rxskb,
				   enum sk_rst_reason reason)
{}

static struct request_sock_ops dccp6_request_sock_ops =;

static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
{}

static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,
					      struct sk_buff *skb,
					      struct request_sock *req,
					      struct dst_entry *dst,
					      struct request_sock *req_unhash,
					      bool *own_req)
{}

/* The socket must have it's spinlock held when we get
 * here.
 *
 * We have a potential double-lock case here, so even when
 * doing backlog processing we use the BH locking scheme.
 * This is because we cannot sleep with the original spinlock
 * held.
 */
static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
{}

static int dccp_v6_rcv(struct sk_buff *skb)
{}

static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
			   int addr_len)
{}

static const struct inet_connection_sock_af_ops dccp_ipv6_af_ops =;

/*
 *	DCCP over IPv4 via INET6 API
 */
static const struct inet_connection_sock_af_ops dccp_ipv6_mapped =;

static void dccp_v6_sk_destruct(struct sock *sk)
{}

/* NOTE: A lot of things set to zero explicitly by call to
 *       sk_alloc() so need not be done here.
 */
static int dccp_v6_init_sock(struct sock *sk)
{}

static struct timewait_sock_ops dccp6_timewait_sock_ops =;

static struct proto dccp_v6_prot =;

static const struct inet6_protocol dccp_v6_protocol =;

static const struct proto_ops inet6_dccp_ops =;

static struct inet_protosw dccp_v6_protosw =;

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

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

static struct pernet_operations dccp_v6_ops =;

static int __init dccp_v6_init(void)
{}

static void __exit dccp_v6_exit(void)
{}

module_init();
module_exit(dccp_v6_exit);

/*
 * __stringify doesn't likes enums, so use SOCK_DCCP (6) and IPPROTO_DCCP (33)
 * values directly, Also cover the case where the protocol is not specified,
 * i.e. net-pf-PF_INET6-proto-0-type-SOCK_DCCP
 */
MODULE_ALIAS_NET_PF_PROTO_TYPE();
MODULE_ALIAS_NET_PF_PROTO_TYPE();
MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();