#include "glob.h"
#include "oplock.h"
#include "misc.h"
#include <linux/sched/signal.h>
#include <linux/workqueue.h>
#include <linux/sysfs.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include "server.h"
#include "smb_common.h"
#include "smbstatus.h"
#include "connection.h"
#include "transport_ipc.h"
#include "mgmt/user_session.h"
#include "crypto_ctx.h"
#include "auth.h"
int ksmbd_debug_types;
struct ksmbd_server_config server_conf;
enum SERVER_CTRL_TYPE { … };
struct server_ctrl_struct { … };
static DEFINE_MUTEX(ctrl_lock);
static int ___server_conf_set(int idx, char *val)
{ … }
int ksmbd_set_netbios_name(char *v)
{ … }
int ksmbd_set_server_string(char *v)
{ … }
int ksmbd_set_work_group(char *v)
{ … }
char *ksmbd_netbios_name(void)
{ … }
char *ksmbd_server_string(void)
{ … }
char *ksmbd_work_group(void)
{ … }
static inline int check_conn_state(struct ksmbd_work *work)
{ … }
#define SERVER_HANDLER_CONTINUE …
#define SERVER_HANDLER_ABORT …
static int __process_request(struct ksmbd_work *work, struct ksmbd_conn *conn,
u16 *cmd)
{ … }
static void __handle_ksmbd_work(struct ksmbd_work *work,
struct ksmbd_conn *conn)
{ … }
static void handle_ksmbd_work(struct work_struct *wk)
{ … }
static int queue_ksmbd_work(struct ksmbd_conn *conn)
{ … }
static int ksmbd_server_process_request(struct ksmbd_conn *conn)
{ … }
static int ksmbd_server_terminate_conn(struct ksmbd_conn *conn)
{ … }
static void ksmbd_server_tcp_callbacks_init(void)
{ … }
static void server_conf_free(void)
{ … }
static int server_conf_init(void)
{ … }
static void server_ctrl_handle_init(struct server_ctrl_struct *ctrl)
{ … }
static void server_ctrl_handle_reset(struct server_ctrl_struct *ctrl)
{ … }
static void server_ctrl_handle_work(struct work_struct *work)
{ … }
static int __queue_ctrl_work(int type)
{ … }
int server_queue_ctrl_init_work(void)
{ … }
int server_queue_ctrl_reset_work(void)
{ … }
static ssize_t stats_show(const struct class *class, const struct class_attribute *attr,
char *buf)
{ … }
static ssize_t kill_server_store(const struct class *class,
const struct class_attribute *attr, const char *buf,
size_t len)
{ … }
static const char * const debug_type_strings[] = …;
static ssize_t debug_show(const struct class *class, const struct class_attribute *attr,
char *buf)
{ … }
static ssize_t debug_store(const struct class *class, const struct class_attribute *attr,
const char *buf, size_t len)
{ … }
static CLASS_ATTR_RO(stats);
static CLASS_ATTR_WO(kill_server);
static CLASS_ATTR_RW(debug);
static struct attribute *ksmbd_control_class_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static struct class ksmbd_control_class = …;
static int ksmbd_server_shutdown(void)
{ … }
static int __init ksmbd_server_init(void)
{ … }
static void __exit ksmbd_server_exit(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
module_init(…) …
module_exit(…)