summaryrefslogtreecommitdiff
path: root/fs/cifsd/server.h
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-03-16 13:07:11 +0900
committerSteve French <stfrench@microsoft.com>2021-05-10 19:15:15 -0500
commit0626e6641f6b467447c81dd7678a69c66f7746cf (patch)
tree426f08b17f354dca58d3101de34a8dddbb62e162 /fs/cifsd/server.h
parent6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff)
downloadlwn-0626e6641f6b467447c81dd7678a69c66f7746cf.tar.gz
lwn-0626e6641f6b467447c81dd7678a69c66f7746cf.zip
cifsd: add server handler for central processing and tranport layers
This adds server handler for central processing, transport layers(tcp, rdma, ipc) and a document describing cifsd architecture. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Acked-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifsd/server.h')
-rw-r--r--fs/cifsd/server.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/fs/cifsd/server.h b/fs/cifsd/server.h
new file mode 100644
index 000000000000..7b2f6318fcff
--- /dev/null
+++ b/fs/cifsd/server.h
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2018 Samsung Electronics Co., Ltd.
+ */
+
+#ifndef __SERVER_H__
+#define __SERVER_H__
+
+#include "smbacl.h"
+
+#define SERVER_STATE_STARTING_UP 0
+#define SERVER_STATE_RUNNING 1
+#define SERVER_STATE_RESETTING 2
+#define SERVER_STATE_SHUTTING_DOWN 3
+
+#define SERVER_CONF_NETBIOS_NAME 0
+#define SERVER_CONF_SERVER_STRING 1
+#define SERVER_CONF_WORK_GROUP 2
+
+extern int ksmbd_debugging;
+
+struct ksmbd_server_config {
+ unsigned int flags;
+ unsigned int state;
+ short signing;
+ short enforced_signing;
+ short min_protocol;
+ short max_protocol;
+ unsigned short tcp_port;
+ unsigned short ipc_timeout;
+ unsigned long ipc_last_active;
+ unsigned long deadtime;
+ unsigned int share_fake_fscaps;
+ struct smb_sid domain_sid;
+ unsigned int auth_mechs;
+
+ char *conf[SERVER_CONF_WORK_GROUP + 1];
+};
+
+extern struct ksmbd_server_config server_conf;
+
+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 ksmbd_server_running(void)
+{
+ return READ_ONCE(server_conf.state) == SERVER_STATE_RUNNING;
+}
+
+static inline int ksmbd_server_configurable(void)
+{
+ return READ_ONCE(server_conf.state) < SERVER_STATE_RESETTING;
+}
+
+int server_queue_ctrl_init_work(void);
+int server_queue_ctrl_reset_work(void);
+#endif /* __SERVER_H__ */