linux/net/mptcp/sockopt.c

// SPDX-License-Identifier: GPL-2.0
/* Multipath TCP
 *
 * Copyright (c) 2021, Red Hat.
 */

#define pr_fmt(fmt)

#include <linux/kernel.h>
#include <linux/module.h>
#include <net/sock.h>
#include <net/protocol.h>
#include <net/tcp.h>
#include <net/mptcp.h>
#include "protocol.h"

#define MIN_INFO_OPTLEN_SIZE
#define MIN_FULL_INFO_OPTLEN_SIZE

static struct sock *__mptcp_tcp_fallback(struct mptcp_sock *msk)
{}

static u32 sockopt_seq_reset(const struct sock *sk)
{}

static void sockopt_seq_inc(struct mptcp_sock *msk)
{}

static int mptcp_get_int_option(struct mptcp_sock *msk, sockptr_t optval,
				unsigned int optlen, int *val)
{}

static void mptcp_sol_socket_sync_intval(struct mptcp_sock *msk, int optname, int val)
{}

static int mptcp_sol_socket_intval(struct mptcp_sock *msk, int optname, int val)
{}

static void mptcp_so_incoming_cpu(struct mptcp_sock *msk, int val)
{}

static int mptcp_setsockopt_sol_socket_tstamp(struct mptcp_sock *msk, int optname, int val)
{}

static int mptcp_setsockopt_sol_socket_int(struct mptcp_sock *msk, int optname,
					   sockptr_t optval,
					   unsigned int optlen)
{}

static int mptcp_setsockopt_sol_socket_timestamping(struct mptcp_sock *msk,
						    int optname,
						    sockptr_t optval,
						    unsigned int optlen)
{}

static int mptcp_setsockopt_sol_socket_linger(struct mptcp_sock *msk, sockptr_t optval,
					      unsigned int optlen)
{}

static int mptcp_setsockopt_sol_socket(struct mptcp_sock *msk, int optname,
				       sockptr_t optval, unsigned int optlen)
{}

static int mptcp_setsockopt_v6(struct mptcp_sock *msk, int optname,
			       sockptr_t optval, unsigned int optlen)
{}

static bool mptcp_supported_sockopt(int level, int optname)
{}

static int mptcp_setsockopt_sol_tcp_congestion(struct mptcp_sock *msk, sockptr_t optval,
					       unsigned int optlen)
{}

static int __mptcp_setsockopt_set_val(struct mptcp_sock *msk, int max,
				      int (*set_val)(struct sock *, int),
				      int *msk_val, int val)
{}

static int __mptcp_setsockopt_sol_tcp_cork(struct mptcp_sock *msk, int val)
{}

static int __mptcp_setsockopt_sol_tcp_nodelay(struct mptcp_sock *msk, int val)
{}

static int mptcp_setsockopt_sol_ip_set(struct mptcp_sock *msk, int optname,
				       sockptr_t optval, unsigned int optlen)
{}

static int mptcp_setsockopt_v4_set_tos(struct mptcp_sock *msk, int optname,
				       sockptr_t optval, unsigned int optlen)
{}

static int mptcp_setsockopt_v4(struct mptcp_sock *msk, int optname,
			       sockptr_t optval, unsigned int optlen)
{}

static int mptcp_setsockopt_first_sf_only(struct mptcp_sock *msk, int level, int optname,
					  sockptr_t optval, unsigned int optlen)
{}

static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
				    sockptr_t optval, unsigned int optlen)
{}

int mptcp_setsockopt(struct sock *sk, int level, int optname,
		     sockptr_t optval, unsigned int optlen)
{}

static int mptcp_getsockopt_first_sf_only(struct mptcp_sock *msk, int level, int optname,
					  char __user *optval, int __user *optlen)
{}

void mptcp_diag_fill_info(struct mptcp_sock *msk, struct mptcp_info *info)
{}
EXPORT_SYMBOL_GPL();

static int mptcp_getsockopt_info(struct mptcp_sock *msk, char __user *optval, int __user *optlen)
{}

static int mptcp_put_subflow_data(struct mptcp_subflow_data *sfd,
				  char __user *optval,
				  u32 copied,
				  int __user *optlen)
{}

static int mptcp_get_subflow_data(struct mptcp_subflow_data *sfd,
				  char __user *optval,
				  int __user *optlen)
{}

static int mptcp_getsockopt_tcpinfo(struct mptcp_sock *msk, char __user *optval,
				    int __user *optlen)
{}

static void mptcp_get_sub_addrs(const struct sock *sk, struct mptcp_subflow_addrs *a)
{}

static int mptcp_getsockopt_subflow_addrs(struct mptcp_sock *msk, char __user *optval,
					  int __user *optlen)
{}

static int mptcp_get_full_info(struct mptcp_full_info *mfi,
			       char __user *optval,
			       int __user *optlen)
{}

static int mptcp_put_full_info(struct mptcp_full_info *mfi,
			       char __user *optval,
			       u32 copylen,
			       int __user *optlen)
{}

static int mptcp_getsockopt_full_info(struct mptcp_sock *msk, char __user *optval,
				      int __user *optlen)
{}

static int mptcp_put_int_option(struct mptcp_sock *msk, char __user *optval,
				int __user *optlen, int val)
{}

static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
				    char __user *optval, int __user *optlen)
{}

static int mptcp_getsockopt_v4(struct mptcp_sock *msk, int optname,
			       char __user *optval, int __user *optlen)
{}

static int mptcp_getsockopt_sol_mptcp(struct mptcp_sock *msk, int optname,
				      char __user *optval, int __user *optlen)
{}

int mptcp_getsockopt(struct sock *sk, int level, int optname,
		     char __user *optval, int __user *option)
{}

static void sync_socket_options(struct mptcp_sock *msk, struct sock *ssk)
{}

void mptcp_sockopt_sync_locked(struct mptcp_sock *msk, struct sock *ssk)
{}

/* unfortunately this is different enough from the tcp version so
 * that we can't factor it out
 */
int mptcp_set_rcvlowat(struct sock *sk, int val)
{}