Server Wait On Clients System - Full Internal Documentation v1.7.0
Server Wait On Clients System.
libswocserver.h
Go to the documentation of this file.
1
14/* **********************************************************************
15 * *
16 * Changelog *
17 * *
18 * Date Author Version Description *
19 * *
20 * 16/07/2016 MG 1.0.1 First versioned release. *
21 * 17/07/2016 MG 1.0.2 Further coding style changes. *
22 * 14/12/2016 MG 1.0.3 Changes for move from NFS share 'file *
23 * as flag' to TCP socket implementation. *
24 * Add server extern. *
25 * Add common server-side validate *
26 * prototype. *
27 * Add new end daemon function prototype. *
28 * 13/02/2017 MG 1.0.4 Add new reload config function. *
29 * 15/05/2017 MG 1.0.5 Change validate config to swocserver- *
30 * only, aot common with swocserverd. *
31 * 12/09/2017 MG 1.0.6 Change sws_force_unlock() to *
32 * sws_unlock(). *
33 * 15/09/2017 MG 1.0.7 Change references to ssl to tls. *
34 * 02/10/2017 MG 1.0.8 Move validate config to common. *
35 * 12/11/2017 MG 1.0.9 Add Doxygen comments. *
36 * Add SPDX license tag. *
37 * 29/03/2018 MG 1.0.10 Add locks_held for use during signal *
38 * handling, primarily in swocserver -w. *
39 * 10/05/2018 MG 1.0.11 Improve function name consistency, *
40 * unlock -> release. *
41 * Add support for server listing blocked *
42 * clients. *
43 * Add client block and unblock. *
44 * Add server block and unblock. *
45 * 18/05/2019 MG 1.0.12 Merge sub-projects into one. *
46 * 11/10/2021 MG 1.0.13 Move to api directory. *
47 * 08/12/2021 MG 1.0.14 Tighten SPDX tag. *
48 * 17/09/2022 MG 1.0.15 Rename portability.h *
49 * Use pkginclude location. *
50 * *
51 ************************************************************************
52 */
53
54#ifndef LIBSWOCSERVER_H
55#define LIBSWOCSERVER_H
56
57#include <libmgec/mge-portability.h>
58
59BEGIN_C_DECLS
60
61extern char locks_held[];
62
63int sws_show_status(void);
64
65int sws_show_block_status(void);
66
67int sws_srv_block(void);
68
69int sws_srv_unblock(void);
70
72
73int sws_server_wait(void);
74
75int sws_release(char *lockname);
76
77int sws_cli_block(char *blockname);
78
79int sws_cli_unblock(char *blockname);
80
81int sws_end_daemon(void);
82
83int sws_reload_config(void);
84
86
88
90
92
93END_C_DECLS
94
95#endif /* ndef LIBSWOCSERVER_H */
int sws_srv_unblock(void)
Request removal of server blocking.
Definition: optionproc.c:274
int sws_end_daemon(void)
Terminate the daemon.
Definition: optionproc.c:600
int sws_show_status(void)
Display clients with active locks to stdout.
Definition: optionproc.c:119
BEGIN_C_DECLS char locks_held[]
Holds the number of locks currently held during swc_client_wait().
Definition: optionproc.c:106
int sws_show_block_status(void)
Display status of server blocking.
Definition: optionproc.c:175
int sws_show_cli_blocklist(void)
Display list of blocked clients to stdout.
Definition: optionproc.c:322
int sws_srv_block(void)
Request server blocking.
Definition: optionproc.c:226
void libswocserver_print_pkg_version(void)
Print the package version string to stdout.
Definition: version.c:63
int sws_cli_unblock(char *blockname)
Unblock a client block.
Definition: optionproc.c:547
int sws_reload_config(void)
Request the daemon to reload the config file.
Definition: optionproc.c:650
int sws_release(char *lockname)
Remove a lock.
Definition: optionproc.c:438
void libswocserver_print_src_version(void)
Print the source version string to stdout.
Definition: version.c:72
int sws_server_wait(void)
Wait until no client locks remain.
Definition: optionproc.c:377
char * libswocserver_get_src_version(void)
Get the source version.
Definition: version.c:55
char * libswocserver_get_pkg_version(void)
Get the git-describe based package version.
Definition: version.c:46
int sws_cli_block(char *blockname)
Set a client to blocked.
Definition: optionproc.c:494