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

Diff of /lbbs/include/common.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 by sysadm, Mon Oct 18 08:17:50 2004 UTC Revision 1.59 by sysadm, Tue Nov 4 13:49:50 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                            bbsd.c  -  description  /*
3                               -------------------   * common
4      begin                : Mon Oct 18 2004   *   - common definitions
5      copyright            : (C) 2004 by Leaflet   *
6      email                : leaflet@leafok.com   * Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com>
7   ***************************************************************************/   */
8    
9  /***************************************************************************  #ifndef _COMMON_H_
10   *                                                                         *  #define _COMMON_H_
11   *   This program is free software; you can redistribute it and/or modify  *  
12   *   it under the terms of the GNU General Public License as published by  *  #include <stddef.h>
13   *   the Free Software Foundation; either version 2 of the License, or     *  #include <libssh/libssh.h>
14   *   (at your option) any later version.                                   *  #include <libssh/server.h>
15   *                                                                         *  
16   ***************************************************************************/  #define LINE_BUFFER_LEN 1024
17    #define FILE_PATH_LEN 4096
18  #include <stdio.h>  
19  #include <time.h>  // Version
20  #include <unistd.h>  #define APP_INFO (PACKAGE_STRING " build on " __DATE__ " " __TIME__)
21  #include <sys/param.h>  
22  #include <sys/types.h>  // Enviroment
23  #include <sys/stat.h>  #define CONF_BBSD "conf/bbsd.conf"
24    #define CONF_MENU "var/menu_merged.conf"
25    #define CONF_BBSNET "conf/bbsnet.conf"
26    #define CONF_TOP10_MENU "var/bbs_top_menu.conf"
27    #define SSH_HOST_KEYFILE "conf/ssh_host_rsa_key"
28    
29    #define LOG_FILE_INFO "log/bbsd.log"
30    #define LOG_FILE_ERROR "log/error.log"
31    
32    #define DATA_WELCOME "data/welcome.txt"
33    #define DATA_REGISTER "data/register.txt"
34    #define DATA_GOODBYE "data/goodbye.txt"
35    #define DATA_LICENSE "data/license.txt"
36    #define DATA_COPYRIGHT "data/copyright.txt"
37    #define DATA_VERSION "data/version.txt"
38    #define DATA_LOGIN_ERROR "data/login_error.txt"
39    #define DATA_ACTIVE_BOARD "data/active_board.txt"
40    #define DATA_READ_HELP "data/read_help.txt"
41    #define DATA_EDITOR_HELP "data/editor_help.txt"
42    
43    #define VAR_BBS_TOP "var/bbs_top.txt"
44    
45    #define VAR_ARTICLE_BLOCK_SHM "var/article_block_shm.~"
46    #define VAR_SECTION_LIST_SHM "var/section_list_shm.~"
47    #define VAR_TRIE_DICT_SHM "var/trie_dict_shm.~"
48    #define VAR_USER_LIST_SHM "var/user_list_shm.~"
49    
50    #define VAR_ARTICLE_CACHE_DIR "var/articles/"
51    #define VAR_GEN_EX_MENU_DIR "var/gen_ex/"
52    #define VAR_SECTION_AID_LOC_DIR "var/section_aid_loc/"
53    
54    // File loader
55    extern const char *data_files_load_startup[];
56    extern const int data_files_load_startup_count;
57    
58    // Screen
59    #define SCREEN_ROWS 24
60    #define SCREEN_COLS 80
61    
62    // Network
63    #define MAX_CLIENT_LIMIT 2000
64    #define MAX_CLIENT_PER_IP_LIMIT 100
65    #define IP_ADDR_LEN 50
66    #define MAX_EVENTS 10
67    
68    extern int socket_server[2];
69    extern int socket_client;
70    extern char hostaddr_client[IP_ADDR_LEN];
71    extern int port_client;
72    
73    // SSHv2
74    extern int SSH_v2;
75    extern ssh_bind sshbind;
76    extern ssh_session SSH_session;
77    extern ssh_channel SSH_channel;
78    
79    // Signal handler
80    extern void sig_hup_handler(int);
81    extern void sig_term_handler(int);
82    extern void sig_chld_handler(int);
83    
84    // System
85    extern volatile int SYS_server_exit;
86    extern volatile int SYS_child_process_count;
87    extern volatile int SYS_child_exit;
88    extern volatile int SYS_conf_reload;
89    
90    #endif //_COMMON_H_


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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