added basic ssl support to ircu
[ircu2.10.12-pk.git] / include / ircd.h
1 /** @file ircd.h
2  * @brief Global data for the daemon.
3  * @version $Id$
4  */
5 #ifndef INCLUDED_ircd_h
6 #define INCLUDED_ircd_h
7 #ifndef INCLUDED_struct_h
8 #include "struct.h"           /* struct Client */
9 #endif
10 #ifndef INCLUDED_sys_types_h
11 #include <sys/types.h>        /* size_t, time_t */
12 #endif
13
14 /** Describes status for a daemon. */
15 struct Daemon
16 {
17   int          argc;        /**< Number of command-line arguments. */
18   char**       argv;        /**< Array of command-line arguments. */
19   pid_t        pid;         /**< %Daemon's process id. */
20   uid_t        uid;         /**< %Daemon's user id. */
21   uid_t        euid;        /**< %Daemon's effective user id. */
22   unsigned int bootopt;     /**< Boot option flags. */
23   int          pid_fd;      /**< File descriptor for process id file. */
24 };
25
26 /*
27  * Macros
28  */
29 #define TStime() (CurrentTime + TSoffset) /**< Current network time*/
30 #define OLDEST_TS 780000000     /**< Any TS older than this is bogus */
31 #define BadPtr(x) (!(x) || (*(x) == '\0')) /**< Is \a x a bad string? */
32
33 /* Miscellaneous defines */
34
35 #define UDP_PORT        "7007"  /**< Default port for server-to-server pings. */
36 #define MINOR_PROTOCOL  "09"    /**< Minimum protocol version supported. */
37 #define MAJOR_PROTOCOL  "10"    /**< Current protocol version. */
38 #define BASE_VERSION    "u2.10" /**< Base name of IRC daemon version. */
39
40 /*
41  * Proto types
42  */
43 extern void server_die(const char* message);
44 extern void server_panic(const char* message);
45 extern void server_restart(const char* message);
46
47 extern struct Client  me;
48 extern time_t         CurrentTime;
49 extern struct Client* GlobalClientList;
50 extern time_t         TSoffset;
51 extern int            GlobalRehashFlag;      /* 1 if SIGHUP is received */
52 extern int            GlobalRestartFlag;     /* 1 if SIGINT is received */
53 extern char*          configfile;
54 extern int            debuglevel;
55 extern char*          debugmode;
56 extern int            running;
57
58 #endif /* INCLUDED_ircd_h */
59