annotate src/dccifd.h @ 206:e9c05e8460b0

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