#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/in.h>
#include <linux/module.h>
#include <net/tcp.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
#include <net/addrconf.h>
#include "rds.h"
#include "tcp.h"
static DEFINE_SPINLOCK(rds_tcp_tc_list_lock);
static LIST_HEAD(rds_tcp_tc_list);
static unsigned int rds_tcp_tc_count;
#if IS_ENABLED(CONFIG_IPV6)
static unsigned int rds6_tcp_tc_count;
#endif
static DEFINE_SPINLOCK(rds_tcp_conn_lock);
static LIST_HEAD(rds_tcp_conn_list);
static atomic_t rds_tcp_unloading = …;
static struct kmem_cache *rds_tcp_conn_slab;
static int rds_tcp_skbuf_handler(const struct ctl_table *ctl, int write,
void *buffer, size_t *lenp, loff_t *fpos);
static int rds_tcp_min_sndbuf = …;
static int rds_tcp_min_rcvbuf = …;
static struct ctl_table rds_tcp_sysctl_table[] = …;
u32 rds_tcp_write_seq(struct rds_tcp_connection *tc)
{ … }
u32 rds_tcp_snd_una(struct rds_tcp_connection *tc)
{ … }
void rds_tcp_restore_callbacks(struct socket *sock,
struct rds_tcp_connection *tc)
{ … }
void rds_tcp_reset_callbacks(struct socket *sock,
struct rds_conn_path *cp)
{ … }
void rds_tcp_set_callbacks(struct socket *sock, struct rds_conn_path *cp)
{ … }
static void rds_tcp_tc_info(struct socket *rds_sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static void rds6_tcp_tc_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#endif
int rds_tcp_laddr_check(struct net *net, const struct in6_addr *addr,
__u32 scope_id)
{ … }
static void rds_tcp_conn_free(void *arg)
{ … }
static int rds_tcp_conn_alloc(struct rds_connection *conn, gfp_t gfp)
{ … }
static bool list_has_conn(struct list_head *list, struct rds_connection *conn)
{ … }
static void rds_tcp_set_unloading(void)
{ … }
static bool rds_tcp_is_unloading(struct rds_connection *conn)
{ … }
static void rds_tcp_destroy_conns(void)
{ … }
static void rds_tcp_exit(void);
static u8 rds_tcp_get_tos_map(u8 tos)
{ … }
struct rds_transport rds_tcp_transport = …;
static unsigned int rds_tcp_netid;
struct rds_tcp_net { … };
bool rds_tcp_tune(struct socket *sock)
{ … }
static void rds_tcp_accept_worker(struct work_struct *work)
{ … }
void rds_tcp_accept_work(struct sock *sk)
{ … }
static __net_init int rds_tcp_init_net(struct net *net)
{ … }
static void rds_tcp_kill_sock(struct net *net)
{ … }
static void __net_exit rds_tcp_exit_net(struct net *net)
{ … }
static struct pernet_operations rds_tcp_net_ops = …;
void *rds_tcp_listen_sock_def_readable(struct net *net)
{ … }
static void rds_tcp_sysctl_reset(struct net *net)
{ … }
static int rds_tcp_skbuf_handler(const struct ctl_table *ctl, int write,
void *buffer, size_t *lenp, loff_t *fpos)
{ … }
static void rds_tcp_exit(void)
{ … }
module_exit(rds_tcp_exit);
static int __init rds_tcp_init(void)
{ … }
module_init(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;