No empty .Rs/.Re
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / resolve_clnt.h
blob2ea187450f716dc4e69b2d9f6ba64d4727cb6305
1 /* $NetBSD$ */
3 #ifndef _RESOLVE_CLNT_H_INCLUDED_
4 #define _RESOLVE_CLNT_H_INCLUDED_
6 /*++
7 /* NAME
8 /* resolve_clnt 3h
9 /* SUMMARY
10 /* address resolver client
11 /* SYNOPSIS
12 /* #include <resolve_clnt.h>
13 /* DESCRIPTION
14 /* .nf
17 * Utility library.
19 #include <vstring.h>
22 * External interface.
24 #define RESOLVE_REGULAR "resolve"
25 #define RESOLVE_VERIFY "verify"
27 #define RESOLVE_FLAG_FINAL (1<<0) /* final delivery */
28 #define RESOLVE_FLAG_ROUTED (1<<1) /* routed destination */
29 #define RESOLVE_FLAG_ERROR (1<<2) /* bad destination syntax */
30 #define RESOLVE_FLAG_FAIL (1<<3) /* request failed */
32 #define RESOLVE_CLASS_LOCAL (1<<8) /* mydestination/inet_interfaces */
33 #define RESOLVE_CLASS_ALIAS (1<<9) /* virtual_alias_domains */
34 #define RESOLVE_CLASS_VIRTUAL (1<<10) /* virtual_mailbox_domains */
35 #define RESOLVE_CLASS_RELAY (1<<11) /* relay_domains */
36 #define RESOLVE_CLASS_DEFAULT (1<<12) /* raise reject_unauth_destination */
38 #define RESOLVE_CLASS_FINAL \
39 (RESOLVE_CLASS_LOCAL | RESOLVE_CLASS_ALIAS | RESOLVE_CLASS_VIRTUAL)
41 #define RESOLVE_CLASS_MASK \
42 (RESOLVE_CLASS_LOCAL | RESOLVE_CLASS_ALIAS | RESOLVE_CLASS_VIRTUAL \
43 | RESOLVE_CLASS_RELAY | RESOLVE_CLASS_DEFAULT)
45 typedef struct RESOLVE_REPLY {
46 VSTRING *transport;
47 VSTRING *nexthop;
48 VSTRING *recipient;
49 int flags;
50 } RESOLVE_REPLY;
52 extern void resolve_clnt_init(RESOLVE_REPLY *);
53 extern void resolve_clnt(const char *, const char *, const char *, RESOLVE_REPLY *);
54 extern void resolve_clnt_free(RESOLVE_REPLY *);
56 #define RESOLVE_NULL_FROM ""
58 #define resolve_clnt_query(a, r) \
59 resolve_clnt(RESOLVE_REGULAR, RESOLVE_NULL_FROM, (a), (r))
60 #define resolve_clnt_verify(a, r) \
61 resolve_clnt(RESOLVE_VERIFY, RESOLVE_NULL_FROM, (a), (r))
63 #define resolve_clnt_query_from(f, a, r) \
64 resolve_clnt(RESOLVE_REGULAR, (f), (a), (r))
65 #define resolve_clnt_verify_from(f, a, r) \
66 resolve_clnt(RESOLVE_VERIFY, (f), (a), (r))
68 #define RESOLVE_CLNT_ASSIGN(reply, transport, nexthop, recipient) { \
69 (reply).transport = (transport); \
70 (reply).nexthop = (nexthop); \
71 (reply).recipient = (recipient); \
74 /* LICENSE
75 /* .ad
76 /* .fi
77 /* The Secure Mailer license must be distributed with this software.
78 /* AUTHOR(S)
79 /* Wietse Venema
80 /* IBM T.J. Watson Research
81 /* P.O. Box 704
82 /* Yorktown Heights, NY 10598, USA
83 /*--*/
85 #endif