X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Fquery.h;h=f9cd0b654539c3e51df515ea0fc52cf9bf9f9e05;hb=e6d0c7ab6103af206f95c1291b29c3f151a41484;hp=b11991c552b0cdf77279f42b7d71ae8adfa3cf70;hpb=9b993811fe1fd208afd954e86c0bfc81a78af04f;p=apps%2Fpfixtools.git diff --git a/postlicyd/query.h b/postlicyd/query.h index b11991c..f9cd0b6 100644 --- a/postlicyd/query.h +++ b/postlicyd/query.h @@ -38,9 +38,9 @@ #define PFIXTOOLS_QUERY_H #include "mem.h" +#include "common.h" enum smtp_state { - SMTP_UNKNOWN, SMTP_CONNECT, SMTP_EHLO, SMTP_HELO = SMTP_EHLO, @@ -50,6 +50,8 @@ enum smtp_state { SMTP_END_OF_MESSAGE, SMTP_VRFY, SMTP_ETRN, + SMTP_count, + SMTP_UNKNOWN, }; /* \see http://www.postfix.org/SMTPD_POLICY_README.html */ @@ -100,4 +102,12 @@ static inline void query_delete(query_t **query) } } +/** Parse the content of the text to fill the query. + * The text pointed by \p p is segmented (and modified to add + * a \0 at the end of each segment) and used to fill the query + * object. + */ +__attribute__((nonnull(1,2))) +bool query_parse(query_t *query, char *p); + #endif