Back to index

opendkim  2.6.4
dkim-tables.h
Go to the documentation of this file.
00001 /*
00002 **  Copyright (c) 2005-2008 Sendmail, Inc. and its suppliers.
00003 **    All rights reserved.
00004 **
00005 **  Copyright (c) 2009, 2010 The OpenDKIM Project.  All rights reserved.
00006 */
00007 
00008 #ifndef _DKIM_TABLES_H_
00009 #define _DKIM_TABLES_H_
00010 
00011 #ifndef lint
00012 static char dkim_tables_h_id[] = "@(#)$Id: dkim-tables.h,v 1.4 2010/02/25 20:11:21 cm-msk Exp $";
00013 #endif /* !lint */
00014 
00015 #ifdef __STDC__
00016 # ifndef __P
00017 #  define __P(x)  x
00018 # endif /* ! __P */
00019 #else /* __STDC__ */
00020 # ifndef __P
00021 #  define __P(x)  ()
00022 # endif /* ! __P */
00023 #endif /* __STDC__ */
00024 
00025 /* structures */
00026 struct nametable
00027 {
00028        const char *  tbl_name;     /* name */
00029        const int     tbl_code;     /* code */
00030 };
00031 
00032 /* tables */
00033 extern struct nametable *algorithms;
00034 extern struct nametable *canonicalizations;
00035 extern struct nametable *hashes;
00036 extern struct nametable *keyflags;
00037 extern struct nametable *keyparams;
00038 extern struct nametable *keytypes;
00039 extern struct nametable *policies;
00040 extern struct nametable *policyparams;
00041 extern struct nametable *policyresults;
00042 extern struct nametable *querytypes;
00043 extern struct nametable *results;
00044 extern struct nametable *settypes;
00045 extern struct nametable *sigerrors;
00046 extern struct nametable *sigparams;
00047 
00048 /* prototypes */
00049 extern const char *dkim_code_to_name __P((struct nametable *tbl,
00050                                           const int code));
00051 extern const int dkim_name_to_code __P((struct nametable *tbl,
00052                                         const char *name));
00053 
00054 #endif /* _DKIM_TABLES_H_ */