1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2018 Samsung Electronics Co., Ltd.
15 SERVER_STATE_STARTING_UP,
17 SERVER_STATE_RESETTING,
18 SERVER_STATE_SHUTTING_DOWN,
22 * Server global config string index
25 SERVER_CONF_NETBIOS_NAME,
26 SERVER_CONF_SERVER_STRING,
27 SERVER_CONF_WORK_GROUP,
30 struct ksmbd_server_config {
34 short enforced_signing;
37 unsigned short tcp_port;
38 unsigned short ipc_timeout;
39 unsigned long ipc_last_active;
40 unsigned long deadtime;
41 unsigned int share_fake_fscaps;
42 struct smb_sid domain_sid;
43 unsigned int auth_mechs;
45 char *conf[SERVER_CONF_WORK_GROUP + 1];
48 extern struct ksmbd_server_config server_conf;
50 int ksmbd_set_netbios_name(char *v);
51 int ksmbd_set_server_string(char *v);
52 int ksmbd_set_work_group(char *v);
54 char *ksmbd_netbios_name(void);
55 char *ksmbd_server_string(void);
56 char *ksmbd_work_group(void);
58 static inline int ksmbd_server_running(void)
60 return READ_ONCE(server_conf.state) == SERVER_STATE_RUNNING;
63 static inline int ksmbd_server_configurable(void)
65 return READ_ONCE(server_conf.state) < SERVER_STATE_RESETTING;
68 int server_queue_ctrl_init_work(void);
69 int server_queue_ctrl_reset_work(void);
70 #endif /* __SERVER_H__ */