/[LeafOK_CVS]/lbbs/include/common.h
ViewVC logotype

Contents of /lbbs/include/common.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.66 - (show annotations)
Mon Nov 17 04:23:09 2025 UTC (3 months, 4 weeks ago) by sysadm
Branch: MAIN
Changes since 1.65: +1 -0 lines
Content type: text/x-chdr
Show copyright info while running the program with --version

1 /* SPDX-License-Identifier: GPL-3.0-or-later */
2 /*
3 * common
4 * - common definitions
5 *
6 * Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com>
7 */
8
9 #ifndef _COMMON_H_
10 #define _COMMON_H_
11
12 #include <stddef.h>
13 #include <libssh/libssh.h>
14 #include <libssh/server.h>
15
16 enum common_constant_t
17 {
18 LINE_BUFFER_LEN = 1024,
19 FILE_PATH_LEN = 4096,
20
21 // Screen
22 SCREEN_ROWS = 24,
23 SCREEN_COLS = 80,
24
25 TAB_SIZE = 4,
26
27 // Network
28 MAX_CLIENT_LIMIT = 2000,
29 MAX_CLIENT_PER_IP_LIMIT = 100,
30 IP_ADDR_LEN = 50,
31 MAX_EVENTS = 10,
32 };
33
34 // Version
35 extern const char APP_INFO[];
36 extern const char COPYRIGHT_INFO[];
37
38 // Enviroment
39 extern const char CONF_BBSD[];
40 extern const char CONF_MENU[];
41 extern const char CONF_BBSNET[];
42 extern const char CONF_BWF[];
43 extern const char CONF_TOP10_MENU[];
44 extern const char SSH_HOST_KEYFILE[];
45
46 extern const char LOG_FILE_INFO[];
47 extern const char LOG_FILE_ERROR[];
48
49 extern const char DATA_WELCOME[];
50 extern const char DATA_REGISTER[];
51 extern const char DATA_GOODBYE[];
52 extern const char DATA_LICENSE[];
53 extern const char DATA_COPYRIGHT[];
54 extern const char DATA_VERSION[];
55 extern const char DATA_LOGIN_ERROR[];
56 extern const char DATA_ACTIVE_BOARD[];
57 extern const char DATA_READ_HELP[];
58 extern const char DATA_EDITOR_HELP[];
59
60 extern const char VAR_BBS_TOP[];
61
62 extern const char VAR_ARTICLE_BLOCK_SHM[];
63 extern const char VAR_SECTION_LIST_SHM[];
64 extern const char VAR_TRIE_DICT_SHM[];
65 extern const char VAR_USER_LIST_SHM[];
66
67 extern const char VAR_ARTICLE_CACHE_DIR[];
68 extern const char VAR_GEN_EX_MENU_DIR[];
69 extern const char VAR_SECTION_AID_LOC_DIR[];
70
71 // File loader
72 extern const char *data_files_load_startup[];
73 extern const int data_files_load_startup_count;
74
75 // Network
76 extern char hostaddr_client[IP_ADDR_LEN];
77 extern int port_client;
78
79 // SSHv2
80 extern int SSH_v2;
81 extern ssh_session SSH_session;
82 extern ssh_channel SSH_channel;
83
84 // Signal handler
85 extern void sig_hup_handler(int);
86 extern void sig_term_handler(int);
87 extern void sig_chld_handler(int);
88
89 // System
90 extern volatile int SYS_server_exit;
91 extern volatile int SYS_child_process_count;
92 extern volatile int SYS_child_exit;
93 extern volatile int SYS_conf_reload;
94
95 #endif //_COMMON_H_

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1