00001 00045 #ifndef __LIB3195_BEEPLISTEN_H_INCLUDED__ 00046 #define __LIB3195_BEEPLISTEN_H_INCLUDED__ 1 00047 #define sbLstnCHECKVALIDOBJECT(x) {assert(x != NULL); assert(x->OID == OIDsbLstn);} 00048 00052 struct sbLstnObject 00053 { 00054 srObjID OID; 00055 struct sbSockObject* pSockListening; 00056 struct sbNVTRObject* pRootSessions; 00057 struct sbNVTRObject* pProfsSupported; 00058 char* szListenAddr; 00059 unsigned uListenPort; 00060 int bRun; 00061 int bLstnBEEP; 00062 struct srAPIObject *pAPI; 00063 # if FEATURE_UDP == 1 00064 /* now come the selectors for different listeners. Remember, we are no 00065 * longer BEEP only (2003-09-29 RGerhards) 00066 */ 00067 int bLstnUDP; 00068 unsigned uUDPLstnPort; 00069 struct sbSockObject* pSockUDPListening; 00070 # endif /* FEATURE_UDP */ 00071 # if FEATURE_UNIX_DOMAIN_SOCKETS == 1 00072 /* now come the selectors for different listeners. Remember, we are no 00073 * longer BEEP only (2003-09-29 RGerhards) 00074 */ 00075 int bLstnUXDOMSOCK; 00076 char *pSockName; 00077 struct sbSockObject* pSockUXDOMSOCKListening; 00078 # endif /* FEATURE_UNIX_DOMAIN_SOCKETS */ 00079 }; 00080 typedef struct sbLstnObject sbLstnObj; 00081 00082 00093 srRetVal sbLstnInit(sbLstnObj* pThis); 00094 00101 srRetVal sbLstnRun(sbLstnObj* pThis); 00102 00106 srRetVal sbLstnExit(sbLstnObj *pThis); 00107 00108 00114 srRetVal sbLstnAddProfile(struct sbLstnObject *pThis, struct sbProfObject *pProf); 00115 00119 srRetVal sbLstnExit(sbLstnObj *pThis); 00120 00124 void sbLstnDestroy(sbLstnObj* pThis); 00125 00136 sbLstnObj* sbLstnConstruct(void); 00137 00138 #endif