summaryrefslogtreecommitdiffstats
path: root/runtime/nsd_ptcp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-28 14:21:58 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-28 14:21:58 +0200
commita3ff7eaf859cd6e91f68421b70c4a46d5a41ff2c (patch)
treee707e999f119f68297ad15072561b894dfd21ce2 /runtime/nsd_ptcp.c
parent10e06c833a55b972c0e4943eea3223f21ad73736 (diff)
downloadrsyslog-a3ff7eaf859cd6e91f68421b70c4a46d5a41ff2c.tar.gz
rsyslog-a3ff7eaf859cd6e91f68421b70c4a46d5a41ff2c.tar.xz
rsyslog-a3ff7eaf859cd6e91f68421b70c4a46d5a41ff2c.zip
added $ActionSendStreamDriverMode config directive
Diffstat (limited to 'runtime/nsd_ptcp.c')
-rw-r--r--runtime/nsd_ptcp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/nsd_ptcp.c b/runtime/nsd_ptcp.c
index 2a74e061..5994fee7 100644
--- a/runtime/nsd_ptcp.c
+++ b/runtime/nsd_ptcp.c
@@ -109,6 +109,22 @@ GetSock(nsd_t *pNsd, int *pSock)
}
+/* Set the driver mode. We support no different modes, but allow mode
+ * 0 to be set to be compatible with config file defaults and the other
+ * drivers.
+ * rgerhards, 2008-04-28
+ */
+static rsRetVal
+SetMode(nsd_t __attribute__((unused)) *pNsd, int mode)
+{
+ DEFiRet;
+ if(mode != 0)
+ ABORT_FINALIZE(RS_RET_INVAID_DRVR_MODE);
+finalize_it:
+ RETiRet;
+}
+
+
/* Provide access to the underlying OS socket. This is primarily
* useful for other drivers (like nsd_gtls) who utilize ourselfs
* for some of their functionality.
@@ -609,6 +625,7 @@ CODESTARTobjQueryInterface(nsd_ptcp)
pIf->Abort = Abort;
pIf->GetSock = GetSock;
pIf->SetSock = SetSock;
+ pIf->SetMode = SetMode;
pIf->Rcv = Rcv;
pIf->Send = Send;
pIf->LstnInit = LstnInit;