Author: Bleep <tomh@inxpress.net>
[ircu2.10.12-pk.git] / include / ircd.h
1 /*
2  * ircd.h
3  *
4  * $Id$
5  */
6 #ifndef INCLUDED_ircd_h
7 #define INCLUDED_ircd_h
8 #ifndef INCLUDED_config_h
9 #include "config.h"
10 #endif
11 #ifndef INCLUDED_struct_h
12 #include "struct.h"           /* struct Client */
13 #endif
14 #ifndef INCLUDED_sys_types_h
15 #include <sys/types.h>        /* size_t, time_t */
16 #endif
17
18 struct Daemon
19 {
20   int          argc;
21   char**       argv;
22   pid_t        pid;
23   uid_t        uid;
24   uid_t        euid;
25   unsigned int bootopt;
26   int          running;
27   const char*  server_bin;
28   const char*  server_root;
29   const char*  server_log;
30 };
31
32 /*
33  * Macros
34  */
35 #define TStime() (CurrentTime + TSoffset)
36 #define OLDEST_TS 780000000     /* Any TS older than this is bogus */
37 #define BadPtr(x) (!(x) || (*(x) == '\0'))
38
39 /* Miscellaneous defines */
40
41 #define UDP_PORT        "7007"
42 #define MINOR_PROTOCOL  "09"
43 #define MAJOR_PROTOCOL  "10"
44 #define BASE_VERSION    "u2.10"
45
46 /*
47  * Proto types
48  */
49 extern void server_die(const char* message);
50 extern void server_restart(const char* message);
51
52 extern struct Client  me;
53 extern time_t         CurrentTime;
54 extern struct Client* GlobalClientList;
55 extern time_t         TSoffset;
56 extern time_t         nextdnscheck;
57 extern time_t         nextconnect;
58 extern int            GlobalRehashFlag;      /* 1 if SIGHUP is received */
59 extern int            GlobalRestartFlag;     /* 1 if SIGINT is received */
60 extern time_t         nextping;
61 extern char*          configfile;
62 extern int            debuglevel;
63 extern char*          debugmode;
64
65 #endif /* INCLUDED_ircd_h */
66