Mercurial > dnsbl
annotate src/dccifd.h @ 253:2d6ecd03bbbe stable-6-0-29
update date on the man pages
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 08 Apr 2012 16:14:32 -0700 |
parents | 82886d4dd71f |
children | 5209e92b4885 |
rev | line source |
---|---|
196 | 1 /* |
2 | |
3 Copyright (c) 2007 Carl Byington - 510 Software Group, released under | |
4 the GPL version 3 or any later version at your choice available at | |
5 http://www.gnu.org/licenses/gpl-3.0.txt | |
6 | |
7 */ | |
8 | |
9 #ifndef _DCCIFD_H | |
10 #define _DCCIFD_H | |
11 | |
12 extern "C" { | |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
13 #include <libmilter/mfapi.h> |
196 | 14 } |
15 | |
16 #ifdef HAVE_CDEFS_H | |
17 #include <sys/cdefs.h> | |
18 #endif | |
19 | |
20 #include <list> | |
21 | |
22 using namespace std; | |
23 | |
24 class mlfiPriv; | |
25 | |
26 class DccInterface { | |
27 public: | |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
28 DccInterface(const char *port_, mlfiPriv *priv_, int ip, const char *helo_, const char *from); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
29 ~DccInterface(); |
196 | 30 |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
31 void mlfi_envrcpt(SMFICTX *ctx, const char *envrcpt, bool grey); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
32 void mlfi_header(SMFICTX *ctx, const char *headerf, const char *headerv); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
33 void mlfi_eoh(); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
34 void mlfi_body(const u_char *bodyp, size_t bodylen); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
35 void mlfi_eom(bool &grey, int &bulk); |
196 | 36 |
37 private: | |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
38 void my_disconnect(); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
39 void Connect(); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
40 size_t my_write(const char *buf, size_t len); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
41 size_t my_read(char *buf, size_t len); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
42 void output(const char *buffer, size_t size); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
43 void output(const char *buffer); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
44 void output(string buffer); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
45 void close_output(); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
46 void input(); |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
47 const char *getmacro(SMFICTX *ctx, const char *macro, const char *def); |
196 | 48 |
49 public: | |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
50 bool err; // socket write error |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
51 bool first_recipient; // have we not seen any recipients? |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
52 bool first_header; // have we not seen any headers? |
196 | 53 |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
54 // connection back to main dnsbl priv structure for logging |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
55 mlfiPriv *priv; |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
56 int ip4; // ip4 address of smtp client |
196 | 57 |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
58 // strings owned by main dnsbl |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
59 const char *helo; // client helo value |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
60 const char *envfrom; // envelope from value for this message |
196 | 61 |
214
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
62 // Process handling variables |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
63 int dccifd_socket; |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
64 const char *dccifd_port; |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
65 string dccifd_output; // to dccifd socket |
82886d4dd71f
Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents:
196
diff
changeset
|
66 string dccifd_input; // from dccifd socket |
196 | 67 }; |
68 | |
69 #endif |