X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=policy.h;h=1ac3c986621b32f1a9fdec048d4675eb14fd491d;hb=5cbb083b27ec285300c7ea0b2ef1b84ffaf2f65a;hp=c4bd145123165e263d175b5bf8ff0639f6577ee0;hpb=9a4efa4f0dc893f243ee69d1b20f024666ca943d;p=apps%2Fpfixtools.git diff --git a/policy.h b/policy.h index c4bd145..1ac3c98 100644 --- 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