1 /*
2 **  Copyright (c) 2005-2008 Sendmail, Inc. and its suppliers.
3 **    All rights reserved.
4 **
5 **  Copyright (c) 2009, 2010, 2012, 2014, The Trusted Domain Project.
6 **    All rights reserved.
7 */
8 
9 #ifndef _DKIM_TABLES_H_
10 #define _DKIM_TABLES_H_
11 
12 #ifdef __STDC__
13 # ifndef __P
14 #  define __P(x)  x
15 # endif /* ! __P */
16 #else /* __STDC__ */
17 # ifndef __P
18 #  define __P(x)  ()
19 # endif /* ! __P */
20 #endif /* __STDC__ */
21 
22 /* structures */
23 struct nametable
24 {
25 	const char *	tbl_name;	/* name */
26 	const int	tbl_code;	/* code */
27 };
28 
29 /* tables */
30 extern struct nametable *algorithms;
31 extern struct nametable *canonicalizations;
32 extern struct nametable *hashes;
33 extern struct nametable *keyflags;
34 extern struct nametable *keyparams;
35 extern struct nametable *keytypes;
36 extern struct nametable *querytypes;
37 extern struct nametable *results;
38 extern struct nametable *settypes;
39 extern struct nametable *sigerrors;
40 extern struct nametable *sigparams;
41 
42 /* prototypes */
43 extern const char *dkim_code_to_name __P((struct nametable *tbl,
44                                           const int code));
45 extern const int dkim_name_to_code __P((struct nametable *tbl,
46                                         const char *name));
47 
48 #endif /* _DKIM_TABLES_H_ */
49