ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config.h
Revision: 5134
Committed: Thu Dec 25 18:50:02 2014 UTC (9 years, 3 months ago) by michael
Content type: text/x-chdr
File size: 1774 byte(s)
Log Message:
- propset svn:keywords "Id"

File Contents

# Content
1 #ifndef CONFIG_H
2 #define CONFIG_H
3
4 #include <stdio.h>
5 #include "list.h"
6 #include "libopm/src/opm_types.h"
7
8 extern char linebuf[512];
9 extern int linenum;
10
11 extern void yyerror(const char *);
12 extern void config_load(const char *);
13
14
15 struct IRCConf
16 {
17 char *nick;
18 char *username;
19 char *realname;
20 char *server;
21 int port;
22 char *password;
23 char *vhost;
24 char *nickserv;
25 char *oper;
26 char *mode;
27 char *away;
28 char *connregex;
29 char *kline;
30 list_t *channels; /* List of ChannelConf */
31 list_t *performs; /* List of char * */
32 };
33
34 struct ChannelConf
35 {
36 char *name;
37 char *key;
38 char *invite;
39 };
40
41 struct OptionsConf
42 {
43 int negcache;
44 unsigned int dns_fdlimit;
45 char *pidfile;
46 char *scanlog;
47 };
48
49 struct UserConf
50 {
51 list_t *masks; /* List of char * */
52 list_t *scanners; /* List of char * */
53 };
54
55 struct ScannerConf
56 {
57 char *name;
58 list_t *protocols;
59 char *vhost;
60 int fd;
61 char *target_ip;
62 int target_port;
63 int timeout;
64 int max_read;
65 list_t *target_string;
66 int target_string_created;
67 };
68
69 struct ProtocolConf
70 {
71 int type;
72 unsigned int port;
73 };
74
75 struct OpmConf
76 {
77 list_t *blacklists;
78 char *dnsbl_from;
79 char *dnsbl_to;
80 char *sendmail;
81 };
82
83 enum BlacklistType
84 {
85 A_BITMASK = 1,
86 A_REPLY
87 };
88
89 struct BlacklistConf
90 {
91 char *name;
92 char *kline;
93 enum BlacklistType type;
94 int ban_unknown;
95 list_t *reply;
96 unsigned int stats_recv;
97 };
98
99 struct BlacklistReplyConf
100 {
101 char number;
102 char *type;
103 };
104
105 struct ExemptConf
106 {
107 list_t *masks;
108 };
109
110
111 /* Extern to actual config data declared in config.c */
112 extern struct IRCConf *IRCItem;
113 extern struct OptionsConf *OptionsItem;
114 extern struct OpmConf *OpmItem;
115 extern struct ExemptConf *ExemptItem;
116 extern list_t *UserItemList;
117 extern list_t *ScannerItemList;
118
119 #endif /* CONFIG_H */

Properties

Name Value
svn:keywords Id