/[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.6 by sysadm, Tue Oct 19 15:22:01 2004 UTC Revision 1.63 by sysadm, Fri Nov 7 04:58:09 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                            common.h  -  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  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   ***************************************************************************/  enum common_constant_t
17    {
18  #include <stdio.h>      LINE_BUFFER_LEN = 1024,
19  #include <time.h>      FILE_PATH_LEN = 4096,
20  #include <unistd.h>  
21  #include <sys/param.h>      // Screen
22  #include <sys/types.h>      SCREEN_ROWS = 24,
23  #include <sys/stat.h>      SCREEN_COLS = 80,
24  #include <sys/socket.h>  
25  #include <netinet/in.h>      // Network
26  #include <netdb.h>      MAX_CLIENT_LIMIT = 2000,
27  #include <mysql/mysql.h>      MAX_CLIENT_PER_IP_LIMIT = 100,
28        IP_ADDR_LEN = 50,
29  //Network      MAX_EVENTS = 10,
30  extern char app_home_dir[256];  };
31  extern int socket_server;  
32    // Version
33    extern const char APP_INFO[];
34    
35    // Enviroment
36    extern const char CONF_BBSD[];
37    extern const char CONF_MENU[];
38    extern const char CONF_BBSNET[];
39    extern const char CONF_BWF[];
40    extern const char CONF_TOP10_MENU[];
41    extern const char SSH_HOST_KEYFILE[];
42    
43    extern const char LOG_FILE_INFO[];
44    extern const char LOG_FILE_ERROR[];
45    
46    extern const char DATA_WELCOME[];
47    extern const char DATA_REGISTER[];
48    extern const char DATA_GOODBYE[];
49    extern const char DATA_LICENSE[];
50    extern const char DATA_COPYRIGHT[];
51    extern const char DATA_VERSION[];
52    extern const char DATA_LOGIN_ERROR[];
53    extern const char DATA_ACTIVE_BOARD[];
54    extern const char DATA_READ_HELP[];
55    extern const char DATA_EDITOR_HELP[];
56    
57    extern const char VAR_BBS_TOP[];
58    
59    extern const char VAR_ARTICLE_BLOCK_SHM[];
60    extern const char VAR_SECTION_LIST_SHM[];
61    extern const char VAR_TRIE_DICT_SHM[];
62    extern const char VAR_USER_LIST_SHM[];
63    
64    extern const char VAR_ARTICLE_CACHE_DIR[];
65    extern const char VAR_GEN_EX_MENU_DIR[];
66    extern const char VAR_SECTION_AID_LOC_DIR[];
67    
68    // File loader
69    extern const char *data_files_load_startup[];
70    extern const int data_files_load_startup_count;
71    
72    // Network
73    extern int socket_server[2];
74  extern int socket_client;  extern int socket_client;
75  extern char hostaddr_server[50];  extern char hostaddr_client[IP_ADDR_LEN];
 extern char hostaddr_client[50];  
 extern int port_server;  
76  extern int port_client;  extern int port_client;
77    
78    // SSHv2
79    extern int SSH_v2;
80    extern ssh_bind sshbind;
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_


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

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