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)  

sysdep_decls.h
Go to the documentation of this file.
1
2#ifndef SYSDEP_DECLS_H
3#define SYSDEP_DECLS_H
4
5#include <stdarg.h>
6#include "sysdep.h"
7
8#ifdef HAVE_PTHREAD_H
9#include <pthread.h>
10#endif
11
12#include <db.h>
13
14#if DB_VERSION_MAJOR < 5
15#error Citadel requires Berkeley DB v5 or newer. Please upgrade.
16#endif
17
18#include "server.h"
19#include "database.h"
20
21#if SIZEOF_SIZE_T == SIZEOF_INT
22#define SIZE_T_FMT "%d"
23#else
24#define SIZE_T_FMT "%ld"
25#endif
26
27#if SIZEOF_LOFF_T == SIZEOF_LONG
28#define LOFF_T_FMT "%ld"
29#else
30#define LOFF_T_FMT "%lld"
31#endif
32
33void cputbuf(const StrBuf *Buf);
34
35#ifdef __GNUC__
36void cprintf (const char *format, ...) __attribute__((__format__(__printf__,1,2)));
37#else
38void cprintf (const char *format, ...);
39#endif
40
41void init_sysdep (void);
42int ctdl_tcp_server(char *ip_addr, int port_number, int queue_len);
43int ctdl_uds_server(char *sockpath, int queue_len);
44void buffer_output(void);
45void unbuffer_output(void);
46void flush_output(void);
47int client_write (const char *buf, int nbytes);
48int client_read_to (char *buf, int bytes, int timeout);
49int client_read (char *buf, int bytes);
50int client_getln (char *buf, int maxbytes);
51int CtdlClientGetLine(StrBuf *Target);
52int client_read_blob(StrBuf *Target, int bytes, int timeout);
53void client_set_inbound_buf(long N);
54int client_read_random_blob(StrBuf *Target, int timeout);
55void client_close(void);
56void sysdep_master_cleanup (void);
57void kill_session (int session_to_kill);
58void start_daemon (int do_close_stdio);
59void checkcrash(void);
60int convert_login (char *NameToConvert);
62void *worker_thread(void *);
63
64extern volatile int exit_signal;
65extern volatile int shutdown_and_halt;
66extern volatile int running_as_daemon;
67extern volatile int restart_server;
68
69extern int verbosity;
70extern int rescan[];
71
72
73extern int SyslogFacility(char *name);
74
75#endif /* SYSDEP_DECLS_H */
void timeout(int signum)
Definition: citmail.c:41
int SyslogFacility(char *name)
Definition: sysdep.c:1083
int CtdlClientGetLine(StrBuf *Target)
Definition: sysdep.c:518
int verbosity
void cprintf(const char *format,...)
Definition: sysdep.c:381
int ctdl_tcp_server(char *ip_addr, int port_number, int queue_len)
Definition: sysdep.c:112
int client_read_to(char *buf, int bytes, int timeout)
Definition: sysdep.c:478
void sysdep_master_cleanup(void)
Definition: sysdep.c:632
int client_read_random_blob(StrBuf *Target, int timeout)
Definition: sysdep.c:447
int client_write(const char *buf, int nbytes)
Definition: sysdep.c:307
void flush_output(void)
Definition: sysdep.c:285
void kill_session(int session_to_kill)
void client_close(void)
Definition: sysdep.c:295
void * worker_thread(void *)
Definition: sysdep.c:839
volatile int restart_server
Definition: sysdep.c:47
void buffer_output(void)
Definition: sysdep.c:267
void init_master_fdset(void)
void checkcrash(void)
Definition: sysdep.c:723
volatile int exit_signal
Definition: sysdep.c:45
int client_getln(char *buf, int maxbytes)
Definition: sysdep.c:548
void client_set_inbound_buf(long N)
Definition: sysdep.c:440
int convert_login(char *NameToConvert)
int client_read_blob(StrBuf *Target, int bytes, int timeout)
Definition: sysdep.c:404
int client_read(char *buf, int bytes)
Definition: sysdep.c:514
volatile int shutdown_and_halt
Definition: sysdep.c:46
void unbuffer_output(void)
Definition: sysdep.c:276
volatile int running_as_daemon
Definition: sysdep.c:48
int rescan[]
int ctdl_uds_server(char *sockpath, int queue_len)
Definition: sysdep.c:198
void start_daemon(int do_close_stdio)
Definition: sysdep.c:651
void cputbuf(const StrBuf *Buf)
Definition: sysdep.c:374
void init_sysdep(void)
Definition: sysdep.c:59