update cflags
[apps/pfixtools.git] / policy.h
index c4bd145..1ac3c98 100644 (file)
--- a/policy.h
+++ b/policy.h
@@ -36,6 +36,8 @@
 #ifndef POSTLICYD_POLICY_H
 #define POSTLICYD_POLICY_H
 
+#include "buffer.h"
+
 enum protocol_state {
     STATE_CONNECT,
     STATE_HELO, /* or EHLO */
@@ -48,7 +50,6 @@ enum protocol_state {
 };
 
 typedef struct policy_request {
-    unsigned ready : 1;
     unsigned state : 4;
     unsigned esmtp : 1;
 
@@ -76,7 +77,15 @@ typedef struct policy_request {
     const char *encryption_cipher;
     const char *encryption_keysize;
     const char *etrn_domain;
+
+    ssize_t  rqsize;
+    buffer_t ibuf;
+    buffer_t obuf;
 } policy_request;
 
+policy_request *pcyrq_init(policy_request *rq);
+void pcyrq_wipe(policy_request *rq);
+DO_NEW(policy_request, pcyrq);
+DO_DELETE(policy_request, pcyrq);
 
 #endif