From 84080b58f8c6c5c040723a02503ddd90f02b5898 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 12 Dec 2008 17:46:20 +0100 Subject: Imported Upstream version 3.20.2 --- tcps_sess.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'tcps_sess.h') diff --git a/tcps_sess.h b/tcps_sess.h index 0433fdf..ff7c167 100644 --- a/tcps_sess.h +++ b/tcps_sess.h @@ -28,18 +28,12 @@ /* a forward-definition, we are somewhat cyclic */ struct tcpsrv_s; -/* framing modes for TCP */ -typedef enum _TCPFRAMINGMODE { - TCP_FRAMING_OCTET_STUFFING = 0, /* traditional LF-delimited */ - TCP_FRAMING_OCTET_COUNTING = 1 /* -transport-tls like octet count */ - } TCPFRAMINGMODE; - /* the tcps_sess object */ typedef struct tcps_sess_s { BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ struct tcpsrv_s *pSrv; /* pointer back to my server (e.g. for callbacks) */ - int sock; - int iMsg; /* index of next char to store in msg */ + netstrm_t *pStrm; + int iMsg; /* index of next char to store in msg */ int bAtStrtOfFram; /* are we at the very beginning of a new frame? */ enum { eAtStrtFram, @@ -48,8 +42,9 @@ typedef struct tcps_sess_s { } inputState; /* our current state */ int iOctetsRemain; /* Number of Octets remaining in message */ TCPFRAMINGMODE eFraming; - char msg[MAXLINE+1]; - char *fromHost; + uchar msg[MAXLINE+1]; + uchar *fromHost; + uchar *fromHostIP; void *pUsr; /* a user-pointer */ } tcps_sess_t; @@ -67,7 +62,8 @@ BEGINinterface(tcps_sess) /* name must also be changed in ENDinterface macro! */ rsRetVal (*SetTcpsrv)(tcps_sess_t *pThis, struct tcpsrv_s *pSrv); rsRetVal (*SetUsrP)(tcps_sess_t*, void*); rsRetVal (*SetHost)(tcps_sess_t *pThis, uchar*); - rsRetVal (*SetSock)(tcps_sess_t *pThis, int); + rsRetVal (*SetHostIP)(tcps_sess_t *pThis, uchar*); + rsRetVal (*SetStrm)(tcps_sess_t *pThis, netstrm_t*); rsRetVal (*SetMsgIdx)(tcps_sess_t *pThis, int); ENDinterface(tcps_sess) #define tcps_sessCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ -- cgit v1.2.3