#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <net/ipv6.h>
#include <net/inet6_hashtables.h>
#include <net/addrconf.h>
#include "rds.h"
#include "loop.h"
#define RDS_CONNECTION_HASH_BITS …
#define RDS_CONNECTION_HASH_ENTRIES …
#define RDS_CONNECTION_HASH_MASK …
static DEFINE_SPINLOCK(rds_conn_lock);
static unsigned long rds_conn_count;
static struct hlist_head rds_conn_hash[RDS_CONNECTION_HASH_ENTRIES];
static struct kmem_cache *rds_conn_slab;
static struct hlist_head *rds_conn_bucket(const struct in6_addr *laddr,
const struct in6_addr *faddr)
{ … }
#define rds_conn_info_set(var, test, suffix) …
static struct rds_connection *rds_conn_lookup(struct net *net,
struct hlist_head *head,
const struct in6_addr *laddr,
const struct in6_addr *faddr,
struct rds_transport *trans,
u8 tos, int dev_if)
{ … }
static void rds_conn_path_reset(struct rds_conn_path *cp)
{ … }
static void __rds_conn_path_init(struct rds_connection *conn,
struct rds_conn_path *cp, bool is_outgoing)
{ … }
static struct rds_connection *__rds_conn_create(struct net *net,
const struct in6_addr *laddr,
const struct in6_addr *faddr,
struct rds_transport *trans,
gfp_t gfp, u8 tos,
int is_outgoing,
int dev_if)
{ … }
struct rds_connection *rds_conn_create(struct net *net,
const struct in6_addr *laddr,
const struct in6_addr *faddr,
struct rds_transport *trans, u8 tos,
gfp_t gfp, int dev_if)
{ … }
EXPORT_SYMBOL_GPL(…);
struct rds_connection *rds_conn_create_outgoing(struct net *net,
const struct in6_addr *laddr,
const struct in6_addr *faddr,
struct rds_transport *trans,
u8 tos, gfp_t gfp, int dev_if)
{ … }
EXPORT_SYMBOL_GPL(…);
void rds_conn_shutdown(struct rds_conn_path *cp)
{ … }
static void rds_conn_path_destroy(struct rds_conn_path *cp)
{ … }
void rds_conn_destroy(struct rds_connection *conn)
{ … }
EXPORT_SYMBOL_GPL(…);
static void __rds_inc_msg_cp(struct rds_incoming *inc,
struct rds_info_iterator *iter,
void *saddr, void *daddr, int flip, bool isv6)
{ … }
static void rds_conn_message_info_cmn(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens,
int want_send, bool isv6)
{ … }
static void rds_conn_message_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens,
int want_send)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static void rds6_conn_message_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens,
int want_send)
{ … }
#endif
static void rds_conn_message_info_send(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static void rds6_conn_message_info_send(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#endif
static void rds_conn_message_info_retrans(struct socket *sock,
unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static void rds6_conn_message_info_retrans(struct socket *sock,
unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#endif
void rds_for_each_conn_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens,
int (*visitor)(struct rds_connection *, void *),
u64 *buffer,
size_t item_len)
{ … }
EXPORT_SYMBOL_GPL(…);
static void rds_walk_conn_path_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens,
int (*visitor)(struct rds_conn_path *, void *),
u64 *buffer,
size_t item_len)
{ … }
static int rds_conn_info_visitor(struct rds_conn_path *cp, void *buffer)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static int rds6_conn_info_visitor(struct rds_conn_path *cp, void *buffer)
{ … }
#endif
static void rds_conn_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static void rds6_conn_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{ … }
#endif
int rds_conn_init(void)
{ … }
void rds_conn_exit(void)
{ … }
void rds_conn_path_drop(struct rds_conn_path *cp, bool destroy)
{ … }
EXPORT_SYMBOL_GPL(…);
void rds_conn_drop(struct rds_connection *conn)
{ … }
EXPORT_SYMBOL_GPL(…);
void rds_conn_path_connect_if_down(struct rds_conn_path *cp)
{ … }
EXPORT_SYMBOL_GPL(…);
void rds_check_all_paths(struct rds_connection *conn)
{ … }
void rds_conn_connect_if_down(struct rds_connection *conn)
{ … }
EXPORT_SYMBOL_GPL(…);
void
__rds_conn_path_error(struct rds_conn_path *cp, const char *fmt, ...)
{ … }