summaryrefslogtreecommitdiffstats
path: root/runtime/nsd.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-24 17:43:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-24 17:43:45 +0200
commit4b05bef636c11cbaf4d32097ed9656a1447ed3d0 (patch)
tree15c698fa86a85e5e3a1db1f14e2eaf6f11c6948f /runtime/nsd.h
parent82095efa24ea0692a6747d4296f398ebd37e5339 (diff)
parenta7040a9623e228043209da897dbf30b9ab02d771 (diff)
downloadrsyslog-4b05bef636c11cbaf4d32097ed9656a1447ed3d0.tar.gz
rsyslog-4b05bef636c11cbaf4d32097ed9656a1447ed3d0.tar.xz
rsyslog-4b05bef636c11cbaf4d32097ed9656a1447ed3d0.zip
Merge branch 'sock-abstract' into tls
Conflicts: runtime/Makefile.am runtime/netstrm.c runtime/nsd.h runtime/nsd_ptcp.c runtime/rsyslog.h
Diffstat (limited to 'runtime/nsd.h')
-rw-r--r--runtime/nsd.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/runtime/nsd.h b/runtime/nsd.h
index 203a65d6..d6fa9e0d 100644
--- a/runtime/nsd.h
+++ b/runtime/nsd.h
@@ -27,6 +27,12 @@
#ifndef INCLUDED_NSD_H
#define INCLUDED_NSD_H
+enum nsdsel_waitOp_e {
+ NSDSEL_RD = 1,
+ NSDSEL_WR = 2,
+ NSDSEL_RDWR = 3
+}; /**< the operation we wait for */
+
/* nsd_t is actually obj_t (which is somewhat better than void* but in essence
* much the same).
*/
@@ -36,17 +42,25 @@ BEGINinterface(nsd) /* name must also be changed in ENDinterface macro! */
rsRetVal (*Construct)(nsd_t **ppThis);
rsRetVal (*Destruct)(nsd_t **ppThis);
rsRetVal (*Abort)(nsd_t *pThis);
- rsRetVal (*LstnInit)(nsd_t *pThis, unsigned char *pLstnPort);
- rsRetVal (*AcceptConnReq)(nsd_t **ppThis, int sock);
rsRetVal (*Rcv)(nsd_t *pThis, uchar *pRcvBuf, ssize_t *pLenBuf);
rsRetVal (*Send)(nsd_t *pThis, uchar *pBuf, ssize_t *pLenBuf);
rsRetVal (*Connect)(nsd_t *pThis, int family, unsigned char *port, unsigned char *host);
- rsRetVal (*GetSock)(nsd_t *pThis, int *pSock);
- /* GetSock() returns an error if the driver does not use plain
- * OS sockets. This interface is primarily meant as an internal aid for
- * those drivers that utilize the nsd_ptcp to do some of their work.
- */
+ rsRetVal (*LstnInit)(netstrms_t *pNS, void *pUsr, rsRetVal(*fAddLstn)(void*,netstrm_t*),
+ uchar *pLstnPort, uchar *pLstnIP, int iSessMax);
+ rsRetVal (*AcceptConnReq)(nsd_t *pThis, nsd_t **ppThis);
+ rsRetVal (*GetRemoteHName)(nsd_t *pThis, uchar **pszName);
+ rsRetVal (*GetRemoteIP)(nsd_t *pThis, uchar **pszIP);
ENDinterface(nsd)
#define nsdCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
+/* interface for the select call */
+BEGINinterface(nsdsel) /* name must also be changed in ENDinterface macro! */
+ rsRetVal (*Construct)(nsdsel_t **ppThis);
+ rsRetVal (*Destruct)(nsdsel_t **ppThis);
+ rsRetVal (*Add)(nsdsel_t *pNsdsel, nsd_t *pNsd, nsdsel_waitOp_t waitOp);
+ rsRetVal (*Select)(nsdsel_t *pNsdsel, int *piNumReady);
+ rsRetVal (*IsReady)(nsdsel_t *pNsdsel, nsd_t *pNsd, nsdsel_waitOp_t waitOp, int *pbIsReady);
+ENDinterface(nsdsel)
+#define nsdselCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
+
#endif /* #ifndef INCLUDED_NSD_H */