Merged Niki's changes to `collectd.h' to trunk/
[collectd.git] / src / collectd.h
1 #ifndef COLLECTD_H
2 #define COLLECTD_H
3
4 #if HAVE_CONFIG_H
5 # include "config.h"
6 #endif
7
8 #include <stdio.h>
9 #if HAVE_SYS_TYPES_H
10 # include <sys/types.h>
11 #endif
12 #if HAVE_SYS_STAT_H
13 # include <sys/stat.h>
14 #endif
15 #if STDC_HEADERS
16 #include <stdlib.h>
17 #include <stddef.h>
18 #else
19 # if HAVE_STDLIB_H
20 #  include <stdlib.h>
21 # endif
22 #endif
23 #if HAVE_STRING_H
24 # if !STDC_HEADERS && HAVE_MEMORY_H
25 #  include <memory.h>
26 # endif
27 # include <string.h>
28 #endif
29 #if HAVE_STRINGS_H
30 # include <strings.h>
31 #endif
32 #if HAVE_INTTYPES_H
33 # include <inttypes.h>
34 #endif
35 #if HAVE_STDINT_H
36 # include <stdint.h>
37 #endif
38 #if HAVE_UNISTD_H
39 # include <unistd.h>
40 #endif
41 #include <sys/wait.h>
42 #include <signal.h>
43 #include <fcntl.h>
44 #include <errno.h>
45 #include <syslog.h>
46 #include <limits.h>
47 #include <time.h>
48
49 #ifndef HAVE_RRD_H
50 #undef HAVE_LIBRRD
51 #endif
52
53 #ifdef HAVE_LIBRRD
54 #include <rrd.h>
55 #endif /* HAVE_LIBRRD */
56
57 /* Won't work without the header file */
58 #ifndef HAVE_KSTAT_H
59 #undef HAVE_LIBKSTAT
60 #endif
61
62 #ifdef HAVE_LIBKSTAT
63 #include <kstat.h>
64 #include <sys/param.h>
65 #endif /* HAVE_LIBKSTAT */
66
67 /* Won't work without the header file */
68 #ifndef HAVE_STATGRAB_H
69 #undef HAVE_LIBSTATGRAB
70 #endif
71
72 #ifdef HAVE_LIBSTATGRAB
73 #include <statgrab.h>
74 #endif
75
76 #ifndef DEBUG
77 #define DEBUG 0
78 #endif
79
80 #ifndef PLUGINDIR
81 #define PLUGINDIR "/usr/lib/collectd"
82 #endif
83
84 #define MODE_SERVER 0x01
85 #define MODE_CLIENT 0x02
86 #define MODE_LOCAL  0x03
87
88 #endif /* COLLECTD_H */