summaryrefslogtreecommitdiffstats
path: root/tcpsrv.h
diff options
context:
space:
mode:
Diffstat (limited to 'tcpsrv.h')
-rw-r--r--tcpsrv.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/tcpsrv.h b/tcpsrv.h
index e5ecb865..0f7dd6c6 100644
--- a/tcpsrv.h
+++ b/tcpsrv.h
@@ -32,6 +32,15 @@ typedef enum ETCPsyslogFramingAnomaly {
frame_CiscoIOS = 2
} eTCPsyslogFramingAnomaly;
+
+/* list of tcp listen ports */
+struct tcpLstnPortList_s {
+ uchar *pszPort; /**< the ports the listener shall listen on */
+ uchar *pszInputName; /**< value to be used as input name */
+ tcpsrv_t *pSrv; /**< pointer to higher-level server instance */
+ tcpLstnPortList_t *pNext; /**< next port or NULL */
+};
+
#define TCPSRV_NO_ADDTL_DELIMITER -1 /* specifies that no additional delimiter is to be used in TCP framing */
/* the tcpsrv object */
@@ -44,8 +53,9 @@ struct tcpsrv_s {
permittedPeers_t *pPermPeers;/**< driver's permitted peers */
int iLstnMax; /**< max nbr of listeners currently supported */
netstrm_t **ppLstn; /**< our netstream listners */
+ tcpLstnPortList_t **ppLstnPort; /**< pointer to relevant listen port description */
int iSessMax; /**< max number of sessions supported */
- char *TCPLstnPort; /**< the port the listener shall listen on */
+ tcpLstnPortList_t *pLstnPorts; /**< head pointer for listen ports */
int addtlFrameDelim; /**< additional frame delimiter for plain TCP syslog framing (e.g. to handle NetScreen) */
tcps_sess_t **pSessions;/**< array of all of our sessions */
void *pUsr; /**< a user-settable pointer (provides extensibility for "derived classes")*/
@@ -70,8 +80,8 @@ BEGINinterface(tcpsrv) /* name must also be changed in ENDinterface macro! */
rsRetVal (*Construct)(tcpsrv_t **ppThis);
rsRetVal (*ConstructFinalize)(tcpsrv_t __attribute__((unused)) *pThis);
rsRetVal (*Destruct)(tcpsrv_t **ppThis);
- void (*configureTCPListen)(tcpsrv_t*, char *cOptarg);
- rsRetVal (*SessAccept)(tcpsrv_t *pThis, tcps_sess_t **ppSess, netstrm_t *pStrm);
+ rsRetVal (*configureTCPListen)(tcpsrv_t*, uchar *pszPort);
+ //rsRetVal (*SessAccept)(tcpsrv_t *pThis, tcpLstnPortList_t*, tcps_sess_t **ppSess, netstrm_t *pStrm);
rsRetVal (*create_tcp_socket)(tcpsrv_t *pThis);
rsRetVal (*Run)(tcpsrv_t *pThis);
/* set methods */