#include <linux/freezer.h>
#include "smb_common.h"
#include "server.h"
#include "auth.h"
#include "connection.h"
#include "transport_tcp.h"
#define IFACE_STATE_DOWN …
#define IFACE_STATE_CONFIGURED …
static atomic_t active_num_conn;
struct interface { … };
static LIST_HEAD(iface_list);
static int bind_additional_ifaces;
struct tcp_transport { … };
static const struct ksmbd_transport_ops ksmbd_tcp_transport_ops;
static void tcp_stop_kthread(struct task_struct *kthread);
static struct interface *alloc_iface(char *ifname);
#define KSMBD_TRANS(t) …
#define TCP_TRANS(t) …
static inline void ksmbd_tcp_nodelay(struct socket *sock)
{ … }
static inline void ksmbd_tcp_reuseaddr(struct socket *sock)
{ … }
static inline void ksmbd_tcp_rcv_timeout(struct socket *sock, s64 secs)
{ … }
static inline void ksmbd_tcp_snd_timeout(struct socket *sock, s64 secs)
{ … }
static struct tcp_transport *alloc_transport(struct socket *client_sk)
{ … }
static void free_transport(struct tcp_transport *t)
{ … }
static unsigned int kvec_array_init(struct kvec *new, struct kvec *iov,
unsigned int nr_segs, size_t bytes)
{ … }
static struct kvec *get_conn_iovec(struct tcp_transport *t, unsigned int nr_segs)
{ … }
static unsigned short ksmbd_tcp_get_port(const struct sockaddr *sa)
{ … }
static int ksmbd_tcp_new_connection(struct socket *client_sk)
{ … }
static int ksmbd_kthread_fn(void *p)
{ … }
static int ksmbd_tcp_run_kthread(struct interface *iface)
{ … }
static int ksmbd_tcp_readv(struct tcp_transport *t, struct kvec *iov_orig,
unsigned int nr_segs, unsigned int to_read,
int max_retries)
{ … }
static int ksmbd_tcp_read(struct ksmbd_transport *t, char *buf,
unsigned int to_read, int max_retries)
{ … }
static int ksmbd_tcp_writev(struct ksmbd_transport *t, struct kvec *iov,
int nvecs, int size, bool need_invalidate,
unsigned int remote_key)
{ … }
static void ksmbd_tcp_disconnect(struct ksmbd_transport *t)
{ … }
static void tcp_destroy_socket(struct socket *ksmbd_socket)
{ … }
static int create_socket(struct interface *iface)
{ … }
static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event,
void *ptr)
{ … }
static struct notifier_block ksmbd_netdev_notifier = …;
int ksmbd_tcp_init(void)
{ … }
static void tcp_stop_kthread(struct task_struct *kthread)
{ … }
void ksmbd_tcp_destroy(void)
{ … }
static struct interface *alloc_iface(char *ifname)
{ … }
int ksmbd_tcp_set_interfaces(char *ifc_list, int ifc_list_sz)
{ … }
static const struct ksmbd_transport_ops ksmbd_tcp_transport_ops = …;