Back to index

citadel  8.12
Classes | Defines | Typedefs | Enumerations | Variables
server.h File Reference
#include "citadel.h"

Go to the source code of this file.

Classes

struct  CtdlMessage
struct  CitControl
struct  ExpressMessage
struct  cdbdata
struct  __visit
struct  arcq
struct  ser_ret
struct  UseTable

Defines

#define INLINE
#define CTDLMESSAGE_MAGIC   0x159d
#define CM_SKIP_HOOKS   0x01 /* Don't run server-side handlers */
#define CTDLEXIT_SHUTDOWN   0 /* Normal shutdown; do NOT auto-restart */
#define CTDLEXIT_CONFIG   101 /* Could not read citadel.config */
#define CTDLEXIT_CONTROL   102 /* Could not acquire lock */
#define CTDLEXIT_HOME   103 /* Citadel home directory not found */
#define CTDLEXIT_OOD   104 /* Out Of Date config - rerun setup */
#define CTDLEXIT_DB   105 /* Unable to initialize database */
#define CTDLEXIT_LIBCITADEL   106 /* Incorrect version of libcitadel */
#define CTDL_EXIT_UNSUP_AUTH   107 /* Unsupported auth mode configured */
#define CS_STEALTH   1 /* stealth mode */
#define CS_CHAT   2 /* chat mode */
#define CS_POSTING   4 /* Posting */
#define EM_BROADCAST   1 /* Broadcast message */
#define EM_GO_AWAY   2 /* Server requests client log off */
#define EM_CHAT   4 /* Server requests client enter chat */
#define UPL_FILE   0
#define UPL_NET   1
#define UPL_IMAGE   2
#define FMT_CITADEL   0 /* Citadel vari-format (proprietary) */
#define FMT_FIXED   1 /* Fixed format (proprietary) */
#define FMT_RFC822   4 /* Standard (headers are in M field) */
#define EVT_STOP   0 /* Session is terminating */
#define EVT_START   1 /* Session is starting */
#define EVT_LOGIN   2 /* A user is logging in */
#define EVT_NEWROOM   3 /* Changing rooms */
#define EVT_LOGOUT   4 /* A user is logging out */
#define EVT_SETPASS   5 /* Setting or changing password */
#define EVT_CMD   6 /* Called after each server command */
#define EVT_RWHO   7 /* An RWHO command is being executed */
#define EVT_ASYNC   8 /* Doing asynchronous messages */
#define EVT_STEALTH   9 /* Entering stealth mode */
#define EVT_UNSTEALTH   10 /* Exiting stealth mode */
#define EVT_TIMER
#define EVT_HOUSE   51 /* as needed houskeeping stuff */
#define EVT_SHUTDOWN   52 /* Server is shutting down */
#define EVT_PURGEUSER   100 /* Deleting a user */
#define EVT_NEWUSER   102 /* Creating a user */
#define EVT_BEFOREREAD   200
#define EVT_BEFORESAVE   201
#define EVT_AFTERSAVE   202
#define EVT_SMTPSCAN   203 /* called before submitting a msg from SMTP */
#define V_FORGET   1 /* User has zapped this room */
#define V_LOCKOUT   2 /* User is locked out of this room */
#define V_ACCESS   4 /* Access is granted to this room */
#define FORDER   "IPTAFONHRDBCEWJGKLQSVXZYUM"

Typedefs

typedef struct __visit visit

Enumerations

enum  {
  KILLME_NOT, KILLME_UNKNOWN, KILLME_CLIENT_LOGGED_OUT, KILLME_IDLE,
  KILLME_CLIENT_DISCONNECTED, KILLME_AUTHFAILED, KILLME_SERVER_SHUTTING_DOWN, KILLME_MAX_SESSIONS_EXCEEDED,
  KILLME_ADMIN_TERMINATE, KILLME_SELECT_INTERRUPTED, KILLME_SELECT_FAILED, KILLME_WRITE_FAILED,
  KILLME_SIMULATION_WORKER, KILLME_NOLOGIN, KILLME_NO_CRYPTO, KILLME_READSTRING_FAILED,
  KILLME_MALLOC_FAILED, KILLME_QUOTA, KILLME_READ_FAILED, KILLME_ILLEGAL_MANAGESIEVE_COMMAND,
  KILLME_SPAMMER, KILLME_XML_PARSER
}
enum  {
  S_USERS, S_ROOMS, S_SESSION_TABLE, S_FLOORTAB,
  S_CHATQUEUE, S_CONTROL, S_NETDB, S_SUPPMSGMAIN,
  S_CONFIG, S_HOUSEKEEPING, S_NTTLIST, S_DIRECTORY,
  S_NETCONFIGS, S_PUBLIC_CLIENTS, S_FLOORCACHE, S_ATBF,
  S_JOURNAL_QUEUE, S_RPLIST, S_SIEVELIST, S_CHKPWD,
  S_LOG, S_NETSPOOL, S_XMPP_QUEUE, S_SCHEDULE_LIST,
  S_SINGLE_USER, S_LDAP, S_IM_LOGS, MAX_SEMAPHORES
}
enum  {
  MT_CITADEL, MT_RFC822, MT_MIME, MT_DOWNLOAD,
  MT_SPEW_SECTION
}
enum  {
  CDB_MSGMAIN, CDB_USERS, CDB_ROOMS, CDB_FLOORTAB,
  CDB_MSGLISTS, CDB_VISIT, CDB_DIRECTORY, CDB_USETABLE,
  CDB_BIGMSGS, CDB_FULLTEXT, CDB_EUIDINDEX, CDB_USERSBYNUMBER,
  CDB_OPENID, MAXCDB
}
enum  { XMSG_PRI_LOCAL, XMSG_PRI_REMOTE, XMSG_PRI_FOREIGN, MAX_XMSG_PRI }

Variables

int ScheduledShutdown

Class Documentation

struct CtdlMessage

Definition at line 21 of file server.h.

Class Members
char cm_anon_type
char * cm_fields
unsigned int cm_flags
char cm_format_type
int cm_magic
struct CitControl

Definition at line 86 of file server.h.

Class Members
int fulltext_wordbreaker
int MMdbversion
unsigned MMflags
long MMfulltext
long MMhighest
long MMnextroom
long MMnextuser
int version
struct ExpressMessage

Definition at line 100 of file server.h.

Collaboration diagram for ExpressMessage:
Class Members
unsigned flags
struct ExpressMessage * next
char sender
char sender_email
char * text
time_t timestamp
struct cdbdata

Definition at line 195 of file server.h.

Class Members
size_t len
char * ptr
struct __visit

Definition at line 238 of file server.h.

Class Members
char v_answered
unsigned int v_flags
long v_lastseen
long v_roomgen
long v_roomnum
char v_seen
long v_usernum
int v_view
struct MetaData

Definition at line 259 of file server.h.

Class Members
char meta_content_type
long meta_msgnum
int meta_refcount
long meta_rfc822_length
char mimetype
struct arcq

Definition at line 271 of file server.h.

Class Members
int arcq_delta
long arcq_msgnum
struct ser_ret

Definition at line 280 of file server.h.

Class Members
size_t len
unsigned char * ser
struct UseTable

Definition at line 289 of file server.h.

Class Members
char ut_msgid
time_t ut_timestamp

Define Documentation

#define CM_SKIP_HOOKS   0x01 /* Don't run server-side handlers */

Definition at line 30 of file server.h.

#define CS_CHAT   2 /* chat mode */

Definition at line 79 of file server.h.

#define CS_POSTING   4 /* Posting */

Definition at line 80 of file server.h.

#define CS_STEALTH   1 /* stealth mode */

Definition at line 78 of file server.h.

#define CTDL_EXIT_UNSUP_AUTH   107 /* Unsupported auth mode configured */

Definition at line 47 of file server.h.

#define CTDLEXIT_CONFIG   101 /* Could not read citadel.config */

Definition at line 41 of file server.h.

#define CTDLEXIT_CONTROL   102 /* Could not acquire lock */

Definition at line 42 of file server.h.

#define CTDLEXIT_DB   105 /* Unable to initialize database */

Definition at line 45 of file server.h.

#define CTDLEXIT_HOME   103 /* Citadel home directory not found */

Definition at line 43 of file server.h.

#define CTDLEXIT_LIBCITADEL   106 /* Incorrect version of libcitadel */

Definition at line 46 of file server.h.

#define CTDLEXIT_OOD   104 /* Out Of Date config - rerun setup */

Definition at line 44 of file server.h.

#define CTDLEXIT_SHUTDOWN   0 /* Normal shutdown; do NOT auto-restart */

Definition at line 34 of file server.h.

#define CTDLMESSAGE_MAGIC   0x159d

Definition at line 29 of file server.h.

#define EM_BROADCAST   1 /* Broadcast message */

Definition at line 109 of file server.h.

#define EM_CHAT   4 /* Server requests client enter chat */

Definition at line 111 of file server.h.

#define EM_GO_AWAY   2 /* Server requests client log off */

Definition at line 110 of file server.h.

#define EVT_AFTERSAVE   202

Definition at line 226 of file server.h.

#define EVT_ASYNC   8 /* Doing asynchronous messages */

Definition at line 213 of file server.h.

#define EVT_BEFOREREAD   200

Definition at line 224 of file server.h.

#define EVT_BEFORESAVE   201

Definition at line 225 of file server.h.

#define EVT_CMD   6 /* Called after each server command */

Definition at line 211 of file server.h.

#define EVT_HOUSE   51 /* as needed houskeeping stuff */

Definition at line 218 of file server.h.

#define EVT_LOGIN   2 /* A user is logging in */

Definition at line 207 of file server.h.

#define EVT_LOGOUT   4 /* A user is logging out */

Definition at line 209 of file server.h.

#define EVT_NEWROOM   3 /* Changing rooms */

Definition at line 208 of file server.h.

#define EVT_NEWUSER   102 /* Creating a user */

Definition at line 222 of file server.h.

#define EVT_PURGEUSER   100 /* Deleting a user */

Definition at line 221 of file server.h.

#define EVT_RWHO   7 /* An RWHO command is being executed */

Definition at line 212 of file server.h.

#define EVT_SETPASS   5 /* Setting or changing password */

Definition at line 210 of file server.h.

#define EVT_SHUTDOWN   52 /* Server is shutting down */

Definition at line 219 of file server.h.

#define EVT_SMTPSCAN   203 /* called before submitting a msg from SMTP */

Definition at line 227 of file server.h.

#define EVT_START   1 /* Session is starting */

Definition at line 206 of file server.h.

#define EVT_STEALTH   9 /* Entering stealth mode */

Definition at line 214 of file server.h.

#define EVT_STOP   0 /* Session is terminating */

Definition at line 205 of file server.h.

#define EVT_TIMER
Value:
50     /* Timer events are called once per minute
                               and are not tied to any session */

Definition at line 217 of file server.h.

#define EVT_UNSTEALTH   10 /* Exiting stealth mode */

Definition at line 215 of file server.h.

#define FMT_CITADEL   0 /* Citadel vari-format (proprietary) */

Definition at line 170 of file server.h.

#define FMT_FIXED   1 /* Fixed format (proprietary) */

Definition at line 171 of file server.h.

#define FMT_RFC822   4 /* Standard (headers are in M field) */

Definition at line 172 of file server.h.

#define FORDER   "IPTAFONHRDBCEWJGKLQSVXZYUM"

Definition at line 300 of file server.h.

#define INLINE

Definition at line 9 of file server.h.

#define UPL_FILE   0

Definition at line 151 of file server.h.

#define UPL_IMAGE   2

Definition at line 153 of file server.h.

#define UPL_NET   1

Definition at line 152 of file server.h.

#define V_ACCESS   4 /* Access is granted to this room */

Definition at line 251 of file server.h.

#define V_FORGET   1 /* User has zapped this room */

Definition at line 249 of file server.h.

#define V_LOCKOUT   2 /* User is locked out of this room */

Definition at line 250 of file server.h.


Typedef Documentation

typedef struct __visit visit

Enumeration Type Documentation

anonymous enum
Enumerator:
KILLME_NOT 
KILLME_UNKNOWN 
KILLME_CLIENT_LOGGED_OUT 
KILLME_IDLE 
KILLME_CLIENT_DISCONNECTED 
KILLME_AUTHFAILED 
KILLME_SERVER_SHUTTING_DOWN 
KILLME_MAX_SESSIONS_EXCEEDED 
KILLME_ADMIN_TERMINATE 
KILLME_SELECT_INTERRUPTED 
KILLME_SELECT_FAILED 
KILLME_WRITE_FAILED 
KILLME_SIMULATION_WORKER 
KILLME_NOLOGIN 
KILLME_NO_CRYPTO 
KILLME_READSTRING_FAILED 
KILLME_MALLOC_FAILED 
KILLME_QUOTA 
KILLME_READ_FAILED 
KILLME_ILLEGAL_MANAGESIEVE_COMMAND 
KILLME_SPAMMER 
KILLME_XML_PARSER 

Definition at line 52 of file server.h.

anonymous enum
Enumerator:
S_USERS 
S_ROOMS 
S_SESSION_TABLE 
S_FLOORTAB 
S_CHATQUEUE 
S_CONTROL 
S_NETDB 
S_SUPPMSGMAIN 
S_CONFIG 
S_HOUSEKEEPING 
S_NTTLIST 
S_DIRECTORY 
S_NETCONFIGS 
S_PUBLIC_CLIENTS 
S_FLOORCACHE 
S_ATBF 
S_JOURNAL_QUEUE 
S_RPLIST 
S_SIEVELIST 
S_CHKPWD 
S_LOG 
S_NETSPOOL 
S_XMPP_QUEUE 
S_SCHEDULE_LIST 
S_SINGLE_USER 
S_LDAP 
S_IM_LOGS 
MAX_SEMAPHORES 

Definition at line 116 of file server.h.

anonymous enum
Enumerator:
MT_CITADEL 
MT_RFC822 
MT_MIME 
MT_DOWNLOAD 
MT_SPEW_SECTION 

Definition at line 159 of file server.h.

     {
       MT_CITADEL,          /* Citadel proprietary */
       MT_RFC822,           /* RFC822 */
       MT_MIME,             /* MIME-formatted message */
       MT_DOWNLOAD,         /* Download a component */
       MT_SPEW_SECTION             /* Download a component in a single operation */
};
anonymous enum
Enumerator:
CDB_MSGMAIN 
CDB_USERS 
CDB_ROOMS 
CDB_FLOORTAB 
CDB_MSGLISTS 
CDB_VISIT 
CDB_DIRECTORY 
CDB_USETABLE 
CDB_BIGMSGS 
CDB_FULLTEXT 
CDB_EUIDINDEX 
CDB_USERSBYNUMBER 
CDB_OPENID 
MAXCDB 

Definition at line 178 of file server.h.

     {
       CDB_MSGMAIN,         /* message base                  */
       CDB_USERS,           /* user file                     */
       CDB_ROOMS,           /* room index                    */
       CDB_FLOORTAB,        /* floor index                   */
       CDB_MSGLISTS,        /* room message lists            */
       CDB_VISIT,           /* user/room relationships       */
       CDB_DIRECTORY,              /* address book directory        */
       CDB_USETABLE,        /* network use table             */
       CDB_BIGMSGS,         /* larger message bodies         */
       CDB_FULLTEXT,        /* full text search index        */
       CDB_EUIDINDEX,              /* locate msgs by EUID           */
       CDB_USERSBYNUMBER,   /* index of users by number      */
       CDB_OPENID,          /* associates OpenIDs with users */
       MAXCDB               /* total number of CDB's defined */
};
anonymous enum
Enumerator:
XMSG_PRI_LOCAL 
XMSG_PRI_REMOTE 
XMSG_PRI_FOREIGN 
MAX_XMSG_PRI 

Definition at line 229 of file server.h.

     {
       XMSG_PRI_LOCAL,             /* Other users on -this- server */
       XMSG_PRI_REMOTE,     /* Other users on a Citadel network (future) */
       XMSG_PRI_FOREIGN,    /* Contacts on foreign instant message hosts */
       MAX_XMSG_PRI

Variable Documentation

Definition at line 82 of file citserver.c.