ARC: For signing, accept A-R header lacking ARC info as equivalent to "none"
[exim.git] / src / src / lookupapi.h
CommitLineData
e6d225ae
DW
1/*************************************************
2* Exim - an Internet mail transport agent *
3*************************************************/
4
3386088d 5/* Copyright (c) University of Cambridge 1995 - 2015 */
e6d225ae
DW
6/* See the file NOTICE for conditions of use and distribution. */
7
8
9/* The "type" field in each item is a set of bit flags:
10
11 lookup_querystyle => this is a query-style lookup,
12 else single-key (+ file) style
13 lookup_absfile => an absolute file name is required,
14 (for single-key style only)
15*/
16
17typedef struct lookup_info {
18 uschar *name; /* e.g. "lsearch" */
19 int type; /* query/singlekey/abs-file */
20 void *(*open)( /* open function */
21 uschar *, /* file name for those that have one */
22 uschar **); /* for error message */
23 BOOL (*check)( /* file checking function */
24 void *, /* handle */
25 uschar *, /* file name */
26 int, /* modemask for file checking */
27 uid_t *, /* owners for file checking */
28 gid_t *, /* owngroups for file checking */
29 uschar **); /* for error messages */
30 int (*find)( /* find function */
31 void *, /* handle */
32 uschar *, /* file name or NULL */
55414b25 33 const uschar *, /* key or query */
e6d225ae
DW
34 int, /* length of key or query */
35 uschar **, /* for returning answer */
36 uschar **, /* for error message */
4c04137d 37 uint *); /* cache TTL, seconds */
e6d225ae
DW
38 void (*close)( /* close function */
39 void *); /* handle */
40 void (*tidy)(void); /* tidy function */
41 uschar *(*quote)( /* quoting function */
42 uschar *, /* string to quote */
43 uschar *); /* additional data from quote name */
6545de78
PP
44 void (*version_report)( /* diagnostic function */
45 FILE *); /* fh to write to */
e6d225ae
DW
46} lookup_info;
47
48/* This magic number is used by the following lookup_module_info structure
14b3c5bc
JH
49 for checking API compatibility. It used to be equivalent to the string"LMM3" */
50#define LOOKUP_MODULE_INFO_MAGIC 0x4c4d4933
6545de78 51/* Version 2 adds: version_report */
14b3c5bc 52/* Version 3 change: non/cache becomes TTL in seconds */
e6d225ae
DW
53
54typedef struct lookup_module_info {
55 uint magic;
56 lookup_info **lookups;
57 uint lookupcount;
58} lookup_module_info;
59
60/* End of lookupapi.h */