summaryrefslogtreecommitdiffstats
path: root/runtime/module-template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-09-27 16:25:53 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-27 16:25:53 +0200
commita96e4966677d21e8bda6ed47b2ee72f565478562 (patch)
tree485ddc0c5628cad7dbc13be0760a7a936216a63f /runtime/module-template.h
parent4cc23e9dc9e906e18539015081b2e5ad16b29417 (diff)
parent53df5066688c8472a9f7be5c86bbc253378e6572 (diff)
downloadrsyslog-a96e4966677d21e8bda6ed47b2ee72f565478562.tar.gz
rsyslog-a96e4966677d21e8bda6ed47b2ee72f565478562.tar.bz2
rsyslog-a96e4966677d21e8bda6ed47b2ee72f565478562.zip
Merge branch 'v6-devel'
Conflicts: ChangeLog action.c grammar/grammar.y runtime/modules.h runtime/rsconf.c
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r--runtime/module-template.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h
index 5d32b909..9dd759a5 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
@@ -353,6 +353,24 @@ finalize_it:\
}
+/* newInpInst()
+ * This is basically the equivalent to newActInst() for creating input
+ * module (listener) instances.
+ */
+#define BEGINnewInpInst \
+static rsRetVal newInpInst(struct nvlst *lst)\
+{\
+ DEFiRet;
+
+#define CODESTARTnewInpInst \
+
+#define CODE_STD_FINALIZERnewInpInst
+
+#define ENDnewInpInst \
+ RETiRet;\
+}
+
+
/* tryResume()
* This entry point is called to check if a module can resume operations. This
* happens when a module requested that it be suspended. In suspended state,
@@ -521,6 +539,16 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
CODEqueryEtryPt_STD_CONF2_CNFNAME_QUERIES
+/* the following block is to be added for input modules that support the v2
+ * config system. The config name is also provided.
+ */
+#define CODEqueryEtryPt_STD_CONF2_IMOD_QUERIES \
+ else if(!strcmp((char*) name, "newInpInst")) {\
+ *pEtryPoint = newInpInst;\
+ } \
+ CODEqueryEtryPt_STD_CONF2_CNFNAME_QUERIES
+
+
/* the following block is to be added for modules that require
* pre priv drop activation support.
*/