Mercurial > dnsbl
comparison src/dccifd.h @ 196:ff6d14d75b1e
add missing files to cvs
author | carl |
---|---|
date | Sat, 02 Feb 2008 10:08:08 -0800 |
parents | |
children | 82886d4dd71f |
comparison
equal
deleted
inserted
replaced
195:797299e9fffc | 196:ff6d14d75b1e |
---|---|
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" { | |
13 #include <libmilter/mfapi.h> | |
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: | |
28 DccInterface(char *port_, mlfiPriv *priv_, int ip, char *helo_, char *from); | |
29 ~DccInterface(); | |
30 | |
31 void mlfi_envrcpt(SMFICTX *ctx, char *envrcpt, bool grey); | |
32 void mlfi_header(SMFICTX *ctx, char* headerf, char* headerv); | |
33 void mlfi_eoh(); | |
34 void mlfi_body(u_char *bodyp, size_t bodylen); | |
35 void mlfi_eom(bool &grey, int &bulk); | |
36 | |
37 private: | |
38 void my_disconnect(); | |
39 void Connect(); | |
40 size_t my_write(const char *buf, size_t len); | |
41 size_t my_read(char *buf, size_t len); | |
42 void output(const char*buffer, size_t size); | |
43 void output(const char*buffer); | |
44 void output(string buffer); | |
45 void close_output(); | |
46 void input(); | |
47 char *getmacro(SMFICTX *ctx, char *macro, char *def); | |
48 | |
49 public: | |
50 bool err; // socket write error | |
51 bool first_recipient; // have we not seen any recipients? | |
52 bool first_header; // have we not seen any headers? | |
53 | |
54 // connection back to main dnsbl priv structure for logging | |
55 mlfiPriv *priv; | |
56 int ip4; // ip4 address of smtp client | |
57 | |
58 // strings owned by main dnsbl | |
59 char *helo; // client helo value | |
60 char *envfrom; // envelope from value for this message | |
61 | |
62 // Process handling variables | |
63 int dccifd_socket; | |
64 char *dccifd_port; | |
65 string dccifd_output; // to dccifd socket | |
66 string dccifd_input; // from dccifd socket | |
67 }; | |
68 | |
69 #endif |