Mercurial > dnsbl
comparison src/dccifd.h @ 214:82886d4dd71f stable-6-0-19
Fixes to compile on Fedora 9 and for const correctness.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 10 Jun 2008 08:58:42 -0700 |
parents | ff6d14d75b1e |
children | 5209e92b4885 |
comparison
equal
deleted
inserted
replaced
213:44ffef730bc4 | 214:82886d4dd71f |
---|---|
8 | 8 |
9 #ifndef _DCCIFD_H | 9 #ifndef _DCCIFD_H |
10 #define _DCCIFD_H | 10 #define _DCCIFD_H |
11 | 11 |
12 extern "C" { | 12 extern "C" { |
13 #include <libmilter/mfapi.h> | 13 #include <libmilter/mfapi.h> |
14 } | 14 } |
15 | 15 |
16 #ifdef HAVE_CDEFS_H | 16 #ifdef HAVE_CDEFS_H |
17 #include <sys/cdefs.h> | 17 #include <sys/cdefs.h> |
18 #endif | 18 #endif |
23 | 23 |
24 class mlfiPriv; | 24 class mlfiPriv; |
25 | 25 |
26 class DccInterface { | 26 class DccInterface { |
27 public: | 27 public: |
28 DccInterface(char *port_, mlfiPriv *priv_, int ip, char *helo_, char *from); | 28 DccInterface(const char *port_, mlfiPriv *priv_, int ip, const char *helo_, const char *from); |
29 ~DccInterface(); | 29 ~DccInterface(); |
30 | 30 |
31 void mlfi_envrcpt(SMFICTX *ctx, char *envrcpt, bool grey); | 31 void mlfi_envrcpt(SMFICTX *ctx, const char *envrcpt, bool grey); |
32 void mlfi_header(SMFICTX *ctx, char* headerf, char* headerv); | 32 void mlfi_header(SMFICTX *ctx, const char *headerf, const char *headerv); |
33 void mlfi_eoh(); | 33 void mlfi_eoh(); |
34 void mlfi_body(u_char *bodyp, size_t bodylen); | 34 void mlfi_body(const u_char *bodyp, size_t bodylen); |
35 void mlfi_eom(bool &grey, int &bulk); | 35 void mlfi_eom(bool &grey, int &bulk); |
36 | 36 |
37 private: | 37 private: |
38 void my_disconnect(); | 38 void my_disconnect(); |
39 void Connect(); | 39 void Connect(); |
40 size_t my_write(const char *buf, size_t len); | 40 size_t my_write(const char *buf, size_t len); |
41 size_t my_read(char *buf, size_t len); | 41 size_t my_read(char *buf, size_t len); |
42 void output(const char*buffer, size_t size); | 42 void output(const char *buffer, size_t size); |
43 void output(const char*buffer); | 43 void output(const char *buffer); |
44 void output(string buffer); | 44 void output(string buffer); |
45 void close_output(); | 45 void close_output(); |
46 void input(); | 46 void input(); |
47 char *getmacro(SMFICTX *ctx, char *macro, char *def); | 47 const char *getmacro(SMFICTX *ctx, const char *macro, const char *def); |
48 | 48 |
49 public: | 49 public: |
50 bool err; // socket write error | 50 bool err; // socket write error |
51 bool first_recipient; // have we not seen any recipients? | 51 bool first_recipient; // have we not seen any recipients? |
52 bool first_header; // have we not seen any headers? | 52 bool first_header; // have we not seen any headers? |
53 | 53 |
54 // connection back to main dnsbl priv structure for logging | 54 // connection back to main dnsbl priv structure for logging |
55 mlfiPriv *priv; | 55 mlfiPriv *priv; |
56 int ip4; // ip4 address of smtp client | 56 int ip4; // ip4 address of smtp client |
57 | 57 |
58 // strings owned by main dnsbl | 58 // strings owned by main dnsbl |
59 char *helo; // client helo value | 59 const char *helo; // client helo value |
60 char *envfrom; // envelope from value for this message | 60 const char *envfrom; // envelope from value for this message |
61 | 61 |
62 // Process handling variables | 62 // Process handling variables |
63 int dccifd_socket; | 63 int dccifd_socket; |
64 char *dccifd_port; | 64 const char *dccifd_port; |
65 string dccifd_output; // to dccifd socket | 65 string dccifd_output; // to dccifd socket |
66 string dccifd_input; // from dccifd socket | 66 string dccifd_input; // from dccifd socket |
67 }; | 67 }; |
68 | 68 |
69 #endif | 69 #endif |