summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.h
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2012-01-11 22:24:38 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2012-01-11 22:24:38 +0000
commitceb7a8da963817e7e0f6a62f9fd26a93262eeb50 (patch)
treec7aba7ec800c423ec7fc4981636e9e31a92cfce4 /usr.sbin/smtpd/smtpd.h
parent52e204d8b74d51eb98e80adcbf166e12b516921f (diff)
implement an envelope_ascii API that's not tied to a specific queue_backend
simplify queue_fsqueue
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r--usr.sbin/smtpd/smtpd.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 7391c1802a7..b3b7fb680e7 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.271 2012/01/11 17:46:36 eric Exp $ */
+/* $OpenBSD: smtpd.h,v 1.272 2012/01/11 22:24:37 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -434,6 +434,32 @@ struct envelope {
};
TAILQ_HEAD(deliverylist, envelope);
+enum envelope_field {
+ EVP_VERSION,
+ EVP_ID,
+ EVP_TYPE,
+ EVP_HELO,
+ EVP_HOSTNAME,
+ EVP_ERRORLINE,
+ EVP_SOCKADDR,
+ EVP_SENDER,
+ EVP_RCPT,
+ EVP_DEST,
+ EVP_CTIME,
+ EVP_EXPIRE,
+ EVP_RETRY,
+ EVP_LASTTRY,
+ EVP_FLAGS,
+ EVP_MDA_METHOD,
+ EVP_MDA_BUFFER,
+ EVP_MDA_USER,
+ EVP_MTA_RELAY_HOST,
+ EVP_MTA_RELAY_PORT,
+ EVP_MTA_RELAY_FLAGS,
+ EVP_MTA_RELAY_CERT,
+ EVP_MTA_RELAY_AUTHMAP
+};
+
enum child_type {
CHILD_INVALID,
@@ -1015,6 +1041,13 @@ int enqueue(int, char **);
int enqueue_offline(int, char **);
+/* envelope.c */
+char *envelope_ascii_field_name(enum envelope_field);
+int envelope_ascii_load(enum envelope_field, struct envelope *, char *);
+int envelope_ascii_dump(enum envelope_field, struct envelope *, char *,
+ size_t);
+
+
/* expand.c */
int expand_cmp(struct expandnode *, struct expandnode *);
void expandtree_increment_node(struct expandtree *, struct expandnode *);