Back to index

opendkim  2.6.6
opendkim-lua.h
Go to the documentation of this file.
00001 /*
00002 **  Copyright (c) 2009-2011, The OpenDKIM Project.  All rights reserved.
00003 **
00004 **  $Id: opendkim-lua.h,v 1.5 2010/09/14 18:23:38 cm-msk Exp $
00005 */
00006 
00007 #ifndef _OPENDKIM_LUA_H_
00008 #define _OPENDKIM_LUA_H_
00009 
00010 #ifndef lint
00011 static char opendkim_lua_h_id[] = "@(#)$Id: opendkim-lua.h,v 1.5 2010/09/14 18:23:38 cm-msk Exp $";
00012 #endif /* !lint */
00013 
00014 /* system includes */
00015 #include <sys/types.h>
00016 
00017 /* types */
00018 struct dkimf_lua_script_result
00019 {
00020        int    lrs_rcount;
00021        char * lrs_error;
00022        char **       lrs_results;
00023 };
00024 
00025 struct dkimf_lua_gc_item
00026 {
00027        int                         gci_type;
00028        void *                      gci_item;
00029        struct dkimf_lua_gc_item *  gci_next;
00030 };
00031 
00032 struct dkimf_lua_gc
00033 {
00034        struct dkimf_lua_gc_item *  gc_head;
00035        struct dkimf_lua_gc_item *  gc_tail;
00036 };
00037 
00038 /* macros */
00039 #define       DKIMF_GC             "_DKIMF_GC"
00040 #define       DKIMF_LUA_GC_DB             1
00041 
00042 /* prototypes */
00043 extern int dkimf_lua_db_hook __P((const char *, size_t, const char *,
00044                                   struct dkimf_lua_script_result *,
00045                                   void **, size_t *));
00046 extern int dkimf_lua_final_hook __P((void *, const char *, size_t,
00047                                      const char *,
00048                                      struct dkimf_lua_script_result *,
00049                                      void **, size_t *));
00050 extern void dkimf_lua_gc_add __P((struct dkimf_lua_gc *g, void *, int));
00051 extern void dkimf_lua_gc_cleanup __P((struct dkimf_lua_gc *));
00052 extern void dkimf_lua_gc_remove __P((struct dkimf_lua_gc *, void *));
00053 extern int dkimf_lua_screen_hook __P((void *, const char *, size_t,
00054                                       const char *,
00055                                       struct dkimf_lua_script_result *,
00056                                       void **, size_t *));
00057 extern int dkimf_lua_setup_hook __P((void *, const char *, size_t,
00058                                      const char *,
00059                                      struct dkimf_lua_script_result *,
00060                                      void **, size_t *));
00061 #ifdef _FFR_STATSEXT
00062 extern int dkimf_lua_stats_hook __P((void *, const char *, size_t,
00063                                      const char *,
00064                                      struct dkimf_lua_script_result *,
00065                                      void **, size_t *));
00066 #endif /* _FFR_STATSEXT */
00067 
00068 #endif /* _OPENDKIM_LUA_H_ */