more fiddling around with ctdlsh
[citadel.git] / ctdlsh / src / ctdlsh.h
1 #include <config.h>
2 #include <stdlib.h>
3 #include <unistd.h>
4 #include <stdio.h>
5 #include <signal.h>
6 #include <sys/types.h>
7 #include <sys/time.h>
8 #include <sys/socket.h>
9 #include <sys/un.h>
10 #include <string.h>
11 #include <pwd.h>
12 #include <errno.h>
13 #include <stdarg.h>
14 #include <fcntl.h>
15 #include <errno.h>
16 #include <readline/readline.h>
17
18 /*
19  * Set to the location of Citadel
20  * FIXME this needs to be configurable
21  */
22 #define CTDLDIR "/appl/citadel"
23
24 /*
25  * This is a small subset of 'struct config' ... don't worry about the rest; we
26  * only need to snarf the c_ipgm_secret.
27  */
28 struct partial_config {
29         char c_nodename[16];            /* Unqualified "short" nodename     */
30         char c_fqdn[64];                /* Fully Qualified Domain Name      */
31         char c_humannode[21];           /* Long name of system              */
32         char c_phonenum[16];            /* Dialup number of system          */
33         uid_t c_ctdluid;                /* UID under which we run Citadel   */
34         char c_creataide;               /* room creator = room aide  flag   */
35         int c_sleeping;                 /* watchdog timer setting           */
36         char c_initax;                  /* initial access level             */
37         char c_regiscall;               /* call number to register on       */
38         char c_twitdetect;              /* twit detect flag                 */
39         char c_twitroom[128];           /* twit detect msg move to room     */
40         char c_moreprompt[80];          /* paginator prompt                 */
41         char c_restrict;                /* restrict Internet mail flag      */
42         long c_niu_1;                   /* (not in use)                     */
43         char c_site_location[32];       /* physical location of server      */
44         char c_sysadm[26];              /* name of system administrator     */
45         char c_niu_2[15];               /* (not in use)                     */
46         int c_setup_level;              /* what rev level we've setup to    */
47         int c_maxsessions;              /* maximum concurrent sessions      */
48         char c_ip_addr[20];             /* IP address to listen on          */
49         int c_port_number;              /* Cit listener port (usually 504)  */
50         int c_ipgm_secret;              /* Internal program authentication  */
51 };
52
53 int cmd_quit(char *);
54 int cmd_datetime(char *);