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