summaryrefslogtreecommitdiffstats
path: root/tcps_sess.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-25 10:47:22 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-25 10:47:22 +0200
commiteb1615068c6a704287eda732d287280df4cc4c44 (patch)
treebf5d8b9cfcdf4203839faf03535149e6ad66f8fc /tcps_sess.h
parent7adb9877f0c08f929d89f436103dfade03e8ea07 (diff)
downloadrsyslog-eb1615068c6a704287eda732d287280df4cc4c44.tar.gz
rsyslog-eb1615068c6a704287eda732d287280df4cc4c44.tar.xz
rsyslog-eb1615068c6a704287eda732d287280df4cc4c44.zip
added new testing module imdiag
which enables to talk to the rsyslog core at runtime. The current implementation is only a beginning, but can be expanded over time
Diffstat (limited to 'tcps_sess.h')
-rw-r--r--tcps_sess.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/tcps_sess.h b/tcps_sess.h
index 2ef28264..5e59aaab 100644
--- a/tcps_sess.h
+++ b/tcps_sess.h
@@ -29,7 +29,7 @@
struct tcpsrv_s;
/* the tcps_sess object */
-typedef struct tcps_sess_s {
+struct tcps_sess_s {
BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */
tcpsrv_t *pSrv; /* pointer back to my server (e.g. for callbacks) */
tcpLstnPortList_t *pLstnInfo; /* pointer back to listener info */
@@ -46,8 +46,9 @@ typedef struct tcps_sess_s {
uchar *pMsg; /* message (fragment) received */
uchar *fromHost;
uchar *fromHostIP;
- void *pUsr; /* a user-pointer */
-} tcps_sess_t;
+ void *pUsr; /* a user-pointer */
+ rsRetVal (*DoSubmitMessage)(tcps_sess_t*, uchar*, int); /* submit message callback */
+};
/* interfaces */
@@ -67,6 +68,7 @@ BEGINinterface(tcps_sess) /* name must also be changed in ENDinterface macro! */
rsRetVal (*SetHostIP)(tcps_sess_t *pThis, uchar*);
rsRetVal (*SetStrm)(tcps_sess_t *pThis, netstrm_t*);
rsRetVal (*SetMsgIdx)(tcps_sess_t *pThis, int);
+ rsRetVal (*SetOnMsgReceive)(tcps_sess_t *pThis, rsRetVal (*OnMsgReceive)(tcps_sess_t*, uchar*, int));
ENDinterface(tcps_sess)
#define tcps_sessCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */
/* interface changes