ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config.h
Revision: 5135
Committed: Thu Dec 25 18:51:51 2014 UTC (11 years, 7 months ago) by michael
Content type: text/x-chdr
File size: 1774 byte(s)
Log Message:
- propset svn:eol-style native

File Contents

# User Rev Content
1 michael 5052 #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 michael 5120 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 michael 5052 };
33    
34     struct ChannelConf
35     {
36 michael 5120 char *name;
37     char *key;
38     char *invite;
39 michael 5052 };
40    
41     struct OptionsConf
42     {
43 michael 5120 int negcache;
44     unsigned int dns_fdlimit;
45     char *pidfile;
46     char *scanlog;
47 michael 5052 };
48    
49     struct UserConf
50     {
51 michael 5120 list_t *masks; /* List of char * */
52     list_t *scanners; /* List of char * */
53 michael 5052 };
54    
55     struct ScannerConf
56     {
57 michael 5120 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 michael 5052 };
68    
69     struct ProtocolConf
70     {
71 michael 5120 int type;
72     unsigned int port;
73 michael 5052 };
74    
75     struct OpmConf
76     {
77 michael 5120 list_t *blacklists;
78     char *dnsbl_from;
79     char *dnsbl_to;
80     char *sendmail;
81 michael 5052 };
82    
83 michael 5120 enum BlacklistType
84     {
85 michael 5052 A_BITMASK = 1,
86     A_REPLY
87     };
88    
89     struct BlacklistConf
90     {
91 michael 5120 char *name;
92     char *kline;
93     enum BlacklistType type;
94     int ban_unknown;
95     list_t *reply;
96     unsigned int stats_recv;
97 michael 5052 };
98    
99     struct BlacklistReplyConf
100     {
101 michael 5120 char number;
102     char *type;
103 michael 5052 };
104    
105     struct ExemptConf
106     {
107 michael 5120 list_t *masks;
108 michael 5052 };
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:eol-style native
svn:keywords Id