ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config.h
Revision: 5332
Committed: Wed Jan 7 18:01:01 2015 UTC (11 years, 6 months ago) by michael
Content type: text/x-chdr
File size: 1841 byte(s)
Log Message:
- Added options::negcache_rebuild configuration option

File Contents

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

Properties

Name Value
svn:eol-style native
svn:keywords Id