summaryrefslogtreecommitdiffstats
path: root/runtime/rsyslog.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-17 12:46:57 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-17 12:46:57 +0200
commit60309004dfc57c3243abb2f01042950201596773 (patch)
tree707b9fbe0e4cc00133611701af0999c1bdacfbfc /runtime/rsyslog.h
parente5130affc022eff12a3d9584576a385edbb13465 (diff)
downloadrsyslog-60309004dfc57c3243abb2f01042950201596773.tar.gz
rsyslog-60309004dfc57c3243abb2f01042950201596773.tar.xz
rsyslog-60309004dfc57c3243abb2f01042950201596773.zip
completed better modularity of runtime
- added the ability to specify an error log function for the runtime - removed dependency of core runtime on dirty.h Note that it is "better" modularity, not perfect. There is still work to do, but I think we can for the time being proceed with other things.
Diffstat (limited to 'runtime/rsyslog.h')
-rw-r--r--runtime/rsyslog.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index 5a3175e2..868bb564 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -59,12 +59,15 @@
/* define some base data types */
+typedef unsigned char uchar;/* get rid of the unhandy "unsigned char" */
typedef struct thrdInfo thrdInfo_t;
typedef struct filed selector_t; /* TODO: this so far resides in syslogd.c, think about modularization */
typedef struct NetAddr netAddr_t;
typedef struct msg msg_t;
typedef struct interface_s interface_t;
typedef struct objInfo_s objInfo_t;
+typedef enum rsRetVal_ rsRetVal; /**< friendly type for global return value */
+typedef rsRetVal (*errLogFunc_t)(uchar*); /* this is a trick to store a function ptr to a function returning a function ptr... */
/* some universal 64 bit define... */
typedef long long int64;
@@ -204,7 +207,6 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth
RS_RET_NO_RUN = 3, /**< operation successful, but function does not like to be executed */
RS_RET_OK = 0 /**< operation successful */
};
-typedef enum rsRetVal_ rsRetVal; /**< friendly type for global return value */
/* some helpful macros to work with srRetVals.
* Be sure to call the to-be-returned variable always "iRet" and
@@ -269,9 +271,6 @@ typedef enum rsObjectID rsObjID;
#define RSFREEOBJ(x) {(x)->OID = OIDrsFreed; free(x);}
#endif
-/* get rid of the unhandy "unsigned char"
- */
-typedef unsigned char uchar;
/* for the time being, we do our own portability handling here. It
* looks like autotools either does not yet support checks for it, or
@@ -297,6 +296,7 @@ void dbgprintf(char *, ...) __attribute__((format(printf, 1, 2)));
* add them. -- rgerhards, 2008-04-17
*/
extern uchar *glblModPath; /* module load path */
+extern rsRetVal (*glblErrLogger)(uchar*);
/* some runtime prototypes */
rsRetVal rsrtInit(char **ppErrObj, obj_if_t *pObjIF);