diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-05-21 18:43:09 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-05-21 18:43:09 +0000 |
commit | 35f89f80ba55c80009486aebffad447798242689 (patch) | |
tree | ab9a9f3904eccf5d0d0191cd88e8d74e3c1a7451 /usr.sbin/smtpd/smtpd.h | |
parent | a61dcf2a9a2624af763862c5913d08d9bab7ebab (diff) |
until now the map_backend API was not really useful for backends that are
not key/val stores. refactored a bit so that smtpd can really take
advantage of backends. preliminary work for ldap support ;-)
no functionnal change
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index eeca47252b0..10cfdeeb6d3 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.224 2011/05/17 18:54:32 gilles Exp $ */ +/* $OpenBSD: smtpd.h,v 1.225 2011/05/21 18:43:08 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -276,18 +276,13 @@ struct map { TAILQ_HEAD(mapel_list, mapel) m_contents; }; + struct map_backend { - enum map_src source; void *(*open)(char *); void (*close)(void *); - char *(*get)(void *, char *, size_t *); - int (*put)(void *, char *, char *); + void *(*lookup)(void *, char *, enum map_kind); }; -struct map_parser { - enum map_kind kind; - void *(*extract)(char *, char *, size_t); -}; enum cond_type { C_ALL, |