citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

server.h File Reference
#include "citadel.h"
Include dependency graph for server.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CtdlMessage
 
struct  recptypes
 
struct  ExpressMessage
 
struct  cdbdata
 
struct  __visit
 
struct  MetaData
 
struct  arcq
 
struct  ser_ret
 
struct  UseTable
 

Macros

#define INLINE
 
#define CTDLMESSAGE_MAGIC   0x159d
 
#define CM_SKIP_HOOKS   0x01 /* Don't run server-side handlers */
 
#define RECPTYPES_MAGIC   0xfeeb
 
#define CTDLEXIT_SHUTDOWN   0
 
#define CTDLEXIT_CONFIG   101
 
#define CTDLEXIT_HOME   103
 
#define CTDLEXIT_DB   105
 
#define CTDLEXIT_LIBCITADEL   106
 
#define CTDL_EXIT_UNSUP_AUTH   107
 
#define CTDLEXIT_UNUSER   108
 
#define CTDLEXIT_CRYPTO   109
 
#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 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_BEFORESAVE   201
 
#define EVT_AFTERSAVE   202
 
#define EVT_SMTPSCAN   203 /* called before submitting a msg from SMTP */
 
#define EVT_AFTERUSRMBOXSAVE   204 /* called afte a message was saved into a users inbox */
 
#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 */
 

Typedefs

typedef struct __visit visit
 
typedef enum _MsgField eMsgField
 

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_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_DIRECTORY , S_NETCONFIGS ,
  S_FLOORCACHE , S_ATBF , S_JOURNAL_QUEUE , 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_EXTAUTH , CDB_CONFIG , MAXCDB
}
 
enum  { XMSG_PRI_LOCAL , XMSG_PRI_REMOTE , XMSG_PRI_FOREIGN , MAX_XMSG_PRI }
 
enum  _MsgField {
  eAuthor = 'A' , eBig_message = 'B' , eExclusiveID = 'E' , erFc822Addr = 'F' ,
  emessageId = 'I' , eJournal = 'J' , eReplyTo = 'K' , eListID = 'L' ,
  eMesageText = 'M' , eOriginalRoom = 'O' , eMessagePath = 'P' , eRecipient = 'R' ,
  eTimestamp = 'T' , eMsgSubject = 'U' , eenVelopeTo = 'V' , eWeferences = 'W' ,
  eCarbonCopY = 'Y' , eErrorMsg = '0' , eSuppressIdx = '1' , eExtnotify = '2' ,
  eVltMsgNum = '3'
}
 

Variables

int ScheduledShutdown
 
uid_t ctdluid
 
int sanity_diag_mode
 

Macro Definition Documentation

◆ CM_SKIP_HOOKS

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

Definition at line 43 of file server.h.

◆ CS_CHAT

#define CS_CHAT   2 /* chat mode */

Definition at line 111 of file server.h.

◆ CS_POSTING

#define CS_POSTING   4 /* Posting */

Definition at line 112 of file server.h.

◆ CS_STEALTH

#define CS_STEALTH   1 /* stealth mode */

Definition at line 110 of file server.h.

◆ CTDL_EXIT_UNSUP_AUTH

#define CTDL_EXIT_UNSUP_AUTH   107

Definition at line 78 of file server.h.

◆ CTDLEXIT_CONFIG

#define CTDLEXIT_CONFIG   101

Definition at line 74 of file server.h.

◆ CTDLEXIT_CRYPTO

#define CTDLEXIT_CRYPTO   109

Definition at line 80 of file server.h.

◆ CTDLEXIT_DB

#define CTDLEXIT_DB   105

Definition at line 76 of file server.h.

◆ CTDLEXIT_HOME

#define CTDLEXIT_HOME   103

Definition at line 75 of file server.h.

◆ CTDLEXIT_LIBCITADEL

#define CTDLEXIT_LIBCITADEL   106

Definition at line 77 of file server.h.

◆ CTDLEXIT_SHUTDOWN

#define CTDLEXIT_SHUTDOWN   0

Definition at line 67 of file server.h.

◆ CTDLEXIT_UNUSER

#define CTDLEXIT_UNUSER   108

Definition at line 79 of file server.h.

◆ CTDLMESSAGE_MAGIC

#define CTDLMESSAGE_MAGIC   0x159d

Definition at line 42 of file server.h.

◆ EM_BROADCAST

#define EM_BROADCAST   1 /* Broadcast message */

Definition at line 127 of file server.h.

◆ EM_CHAT

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

Definition at line 129 of file server.h.

◆ EM_GO_AWAY

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

Definition at line 128 of file server.h.

◆ EVT_AFTERSAVE

#define EVT_AFTERSAVE   202

Definition at line 232 of file server.h.

◆ EVT_AFTERUSRMBOXSAVE

#define EVT_AFTERUSRMBOXSAVE   204 /* called afte a message was saved into a users inbox */

Definition at line 234 of file server.h.

◆ EVT_ASYNC

#define EVT_ASYNC   8 /* Doing asynchronous messages */

Definition at line 220 of file server.h.

◆ EVT_BEFORESAVE

#define EVT_BEFORESAVE   201

Definition at line 231 of file server.h.

◆ EVT_CMD

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

Definition at line 218 of file server.h.

◆ EVT_HOUSE

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

Definition at line 225 of file server.h.

◆ EVT_LOGIN

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

Definition at line 214 of file server.h.

◆ EVT_LOGOUT

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

Definition at line 216 of file server.h.

◆ EVT_NEWROOM

#define EVT_NEWROOM   3 /* Changing rooms */

Definition at line 215 of file server.h.

◆ EVT_NEWUSER

#define EVT_NEWUSER   102 /* Creating a user */

Definition at line 229 of file server.h.

◆ EVT_PURGEUSER

#define EVT_PURGEUSER   100 /* Deleting a user */

Definition at line 228 of file server.h.

◆ EVT_RWHO

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

Definition at line 219 of file server.h.

◆ EVT_SETPASS

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

Definition at line 217 of file server.h.

◆ EVT_SHUTDOWN

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

Definition at line 226 of file server.h.

◆ EVT_SMTPSCAN

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

Definition at line 233 of file server.h.

◆ EVT_START

#define EVT_START   1 /* Session is starting */

Definition at line 213 of file server.h.

◆ EVT_STEALTH

#define EVT_STEALTH   9 /* Entering stealth mode */

Definition at line 221 of file server.h.

◆ EVT_STOP

#define EVT_STOP   0 /* Session is terminating */

Definition at line 212 of file server.h.

◆ EVT_TIMER

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

Definition at line 224 of file server.h.

◆ EVT_UNSTEALTH

#define EVT_UNSTEALTH   10 /* Exiting stealth mode */

Definition at line 222 of file server.h.

◆ FMT_CITADEL

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

Definition at line 176 of file server.h.

◆ FMT_FIXED

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

Definition at line 177 of file server.h.

◆ FMT_RFC822

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

Definition at line 178 of file server.h.

◆ INLINE

#define INLINE

Definition at line 21 of file server.h.

◆ RECPTYPES_MAGIC

#define RECPTYPES_MAGIC   0xfeeb

Definition at line 65 of file server.h.

◆ V_ACCESS

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

Definition at line 258 of file server.h.

◆ V_FORGET

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

Definition at line 256 of file server.h.

◆ V_LOCKOUT

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

Definition at line 257 of file server.h.

Typedef Documentation

◆ eMsgField

typedef enum _MsgField eMsgField

◆ visit

typedef struct __visit visit

Enumeration Type Documentation

◆ anonymous enum

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_SPAMMER 
KILLME_XML_PARSER 

Definition at line 85 of file server.h.

◆ anonymous enum

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_DIRECTORY 
S_NETCONFIGS 
S_FLOORCACHE 
S_ATBF 
S_JOURNAL_QUEUE 
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 134 of file server.h.

◆ anonymous enum

anonymous enum
Enumerator
MT_CITADEL 
MT_RFC822 
MT_MIME 
MT_DOWNLOAD 
MT_SPEW_SECTION 

Definition at line 165 of file server.h.

◆ anonymous enum

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_EXTAUTH 
CDB_CONFIG 
MAXCDB 

Definition at line 184 of file server.h.

◆ anonymous enum

anonymous enum
Enumerator
XMSG_PRI_LOCAL 
XMSG_PRI_REMOTE 
XMSG_PRI_FOREIGN 
MAX_XMSG_PRI 

Definition at line 236 of file server.h.

◆ _MsgField

enum _MsgField
Enumerator
eAuthor 
eBig_message 
eExclusiveID 
erFc822Addr 
emessageId 
eJournal 
eReplyTo 
eListID 
eMesageText 
eOriginalRoom 
eMessagePath 
eRecipient 
eTimestamp 
eMsgSubject 
eenVelopeTo 
eWeferences 
eCarbonCopY 
eErrorMsg 
eSuppressIdx 
eExtnotify 
eVltMsgNum 

Definition at line 306 of file server.h.

Variable Documentation

◆ ctdluid

uid_t ctdluid
extern

Definition at line 30 of file server_main.c.

Referenced by cmd_conf(), edit_value(), main(), master_startup(), and validate_config().

◆ sanity_diag_mode

int sanity_diag_mode
extern

Definition at line 33 of file server_main.c.

Referenced by check_control(), control_find_user(), and main().

◆ ScheduledShutdown

int ScheduledShutdown
extern

Definition at line 26 of file citserver.c.

Referenced by check_sched_shutdown(), and cmd_scdn().