Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 24 additions & 28 deletions src/relp.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ relpEngineDelSess(relpEngine_t *const pThis, relpEngSessLst_t *pSessLstEntry)
* RELP function. The relp engine must only destructed after all RELP
* operations have been finished.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineConstruct(relpEngine_t **ppThis)
{
relpEngine_t *pThis;
Expand Down Expand Up @@ -281,7 +281,7 @@ relpEngineConstruct(relpEngine_t **ppThis)
* Terminates librelp operations, no calls are permitted after engine
* destruction.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineDestruct(relpEngine_t **ppThis)
{
relpEngine_t *pThis;
Expand Down Expand Up @@ -325,7 +325,7 @@ static void dbgprintDummy(char LIBRELP_ATTR_UNUSED *fmt, ...) {}
* function that already has been set, provide a NULL function pointer.
* rgerhards, 2008-03-17
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetDbgprint(relpEngine_t *const pThis, void (*dbgprint)(char *fmt, ...) LIBRELP_ATTR_FORMAT(printf, 1, 2))
{
ENTER_RELPFUNC;
Expand All @@ -336,7 +336,7 @@ relpEngineSetDbgprint(relpEngine_t *const pThis, void (*dbgprint)(char *fmt, ...
}


relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetTLSLib(relpEngine_t *const pThis, NOTLS_UNUSED const int tls_lib)
{
ENTER_RELPFUNC;
Expand Down Expand Up @@ -375,7 +375,7 @@ relpEngineSetTLSLib(relpEngine_t *const pThis, NOTLS_UNUSED const int tls_lib)
}


relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetTLSLibByName(relpEngine_t *const pThis, const char *const name)
{
ENTER_RELPFUNC;
Expand Down Expand Up @@ -409,7 +409,7 @@ relpEngineSetTLSLibByName(relpEngine_t *const pThis, const char *const name)
* * relgEngineListnerConstructFinalize()
* rgerhards, 2013-05-14
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineListnerConstruct(relpEngine_t *const pThis, relpSrv_t **ppSrv)
{
relpSrv_t *pSrv;
Expand All @@ -422,7 +422,7 @@ relpEngineListnerConstruct(relpEngine_t *const pThis, relpSrv_t **ppSrv)
finalize_it:
LEAVE_RELPFUNC;
}
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineListnerConstructFinalize(relpEngine_t *const pThis, relpSrv_t *pSrv)
{
ENTER_RELPFUNC;
Expand Down Expand Up @@ -456,7 +456,7 @@ static relpRetVal relpSrvSyslogRcvDummy3(void LIBRELP_ATTR_UNUSED *pUsr,
/* set the syslog receive callback. If NULL is provided, it is set to the
* not implemented dummy.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetSyslogRcv2(relpEngine_t *const pThis, relpRetVal (*pCB)(void *, unsigned char*,
unsigned char*, unsigned char*, size_t))
{
Expand All @@ -472,7 +472,7 @@ relpEngineSetSyslogRcv2(relpEngine_t *const pThis, relpRetVal (*pCB)(void *, uns
/* set the syslog receive callback. If NULL is provided, it is set to the
* not implemented dummy.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetSyslogRcv3(relpEngine_t *const pThis, relpRetVal (*pCB)(void *, unsigned char*,
unsigned char*, unsigned char*, unsigned char*, size_t))
{
Expand Down Expand Up @@ -506,7 +506,7 @@ relpEngineSetSyslogRcv3(relpEngine_t *const pThis, relpRetVal (*pCB)(void *, uns
* errmsg - error message as far as librelp is concerned
* errcode - contains librelp error status that lead to the failed auth.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetOnAuthErr(relpEngine_t *const pThis, void (*pCB)(void*pUsr, char *authinfo, char*errmsg, relpRetVal errcode) )
{
ENTER_RELPFUNC;
Expand All @@ -530,7 +530,7 @@ relpEngineSetOnAuthErr(relpEngine_t *const pThis, void (*pCB)(void*pUsr, char *a
* errmsg - error message as far as librelp is concerned
* errcode - contains librelp error status
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetOnErr(relpEngine_t *const pThis, void (*pCB)(void*pUsr, char *objinfo, char*errmsg, relpRetVal errcode) )
{
ENTER_RELPFUNC;
Expand All @@ -550,7 +550,7 @@ relpEngineSetOnErr(relpEngine_t *const pThis, void (*pCB)(void*pUsr, char *objin
* errmsg - error message as far as librelp is concerned
* errcode - contains librelp error status
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetOnGenericErr(relpEngine_t *const pThis, void (*pCB)(char *objinfo, char*errmsg, relpRetVal errcode) )
{
ENTER_RELPFUNC;
Expand All @@ -562,7 +562,7 @@ relpEngineSetOnGenericErr(relpEngine_t *const pThis, void (*pCB)(char *objinfo,
/* Deprecated, use relpEngineListnerConstruct() family of functions.
* See there for further information.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineAddListner2(relpEngine_t *const pThis, unsigned char *pLstnPort, void *pUsr)
{
relpSrv_t *pSrv = NULL;
Expand Down Expand Up @@ -590,7 +590,7 @@ static relpRetVal relpSrvSyslogRcvDummy(unsigned char LIBRELP_ATTR_UNUSED *pHost
/* set the syslog receive callback. If NULL is provided, it is set to the
* not implemented dummy.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetSyslogRcv(relpEngine_t *const pThis, relpRetVal (*pCB)(unsigned char*, unsigned char*, unsigned char*, size_t))
{
ENTER_RELPFUNC;
Expand All @@ -605,7 +605,7 @@ relpEngineSetSyslogRcv(relpEngine_t *const pThis, relpRetVal (*pCB)(unsigned cha
/* Deprecated, use relpEngineListnerConstruct() family of functions.
* See there for further information.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineAddListner(relpEngine_t *const pThis, unsigned char *pLstnPort)
{
relpSrv_t *pSrv = NULL;
Expand All @@ -629,7 +629,7 @@ relpEngineAddListner(relpEngine_t *const pThis, unsigned char *pLstnPort)
* signal is sent, it may take rather long to stop the server (until another
* machine sends data).
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetStop(relpEngine_t *const pThis)
{
ENTER_RELPFUNC;
Expand All @@ -641,7 +641,7 @@ relpEngineSetStop(relpEngine_t *const pThis)

/* set the socket family to use
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetFamily(relpEngine_t *const pThis, int ai_family)
{
ENTER_RELPFUNC;
Expand Down Expand Up @@ -1044,7 +1044,7 @@ engineEventLoopRun(relpEngine_t *const pThis)
* the several flavours of enhanced OS APIs.
* rgerhards, 2008-03-17
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineRun(relpEngine_t *const pThis)
{
ENTER_RELPFUNC;
Expand Down Expand Up @@ -1124,7 +1124,7 @@ relpEngineDispatchFrame(relpEngine_t *const pThis, relpSess_t *pSess, relpFrame_
* users should always call the client-generating functions inside the engine.
* rgerhards, 2008-03-19
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineCltConstruct(relpEngine_t *const pThis, relpClt_t **ppClt)
{
ENTER_RELPFUNC;
Expand All @@ -1143,7 +1143,7 @@ relpEngineCltConstruct(relpEngine_t *const pThis, relpClt_t **ppClt)
* relpEngineCltConstruct(), see comment there for details.
* rgerhards, 2008-03-19
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineCltDestruct(relpEngine_t *const pThis, relpClt_t **ppClt)
{
ENTER_RELPFUNC;
Expand All @@ -1163,11 +1163,7 @@ relpEngineCltDestruct(relpEngine_t *const pThis, relpClt_t **ppClt)
* a configure library entry point check.
* rgerhards, 2008-03-25
*/
#ifdef __GNUC__
/* somehow gcc-8 always gives as a wrong warning, which we so disable */
#pragma GCC diagnostic ignored "-Wattributes"
#endif
const char * PART_OF_API
PART_OF_API const char *
relpEngineGetVersion(void)
{
# ifdef DEBUG
Expand All @@ -1177,7 +1173,7 @@ relpEngineGetVersion(void)
# endif
}

void PART_OF_API
PART_OF_API void
relpEngineSetShutdownImmdtPtr(relpEngine_t *const pThis, int *ptr)
{
if(pThis->bShutdownImmdt != ptr)
Expand All @@ -1188,7 +1184,7 @@ relpEngineSetShutdownImmdtPtr(relpEngine_t *const pThis, int *ptr)
* it has been set to forbidden! There will be no error return state in this
* case. -- rgerhards, 2008-03-27
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetEnableCmd(relpEngine_t *const pThis, unsigned char *pszCmd, relpCmdEnaState_t stateCmd)
{
ENTER_RELPFUNC;
Expand All @@ -1212,7 +1208,7 @@ relpEngineSetEnableCmd(relpEngine_t *const pThis, unsigned char *pszCmd, relpCmd
* session. If disabled, the IP address will be used as the hostname.
* rgerhards, 2008-03-31
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpEngineSetDnsLookupMode(relpEngine_t *const pThis, const int iMode)
{
ENTER_RELPFUNC;
Expand Down
38 changes: 19 additions & 19 deletions src/relpclt.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ relpCltDestruct(relpClt_t **ppThis)
* remote servers parameters must already have been set.
* rgerhards, 2008-03-19
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltConnect(relpClt_t *const pThis, int protFamily, unsigned char *port, unsigned char *host)
{
ENTER_RELPFUNC;
Expand Down Expand Up @@ -155,7 +155,7 @@ relpCltConnect(relpClt_t *const pThis, int protFamily, unsigned char *port, unsi
* remote host) can not be changed.
* rgerhards, 2008-03-23
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltReconnect(relpClt_t *const pThis)
{
ENTER_RELPFUNC;
Expand All @@ -172,7 +172,7 @@ relpCltReconnect(relpClt_t *const pThis)
/** Set the relp window size for this client. Value 0 means
* that the default value is to be used.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetWindowSize(relpClt_t *const pThis, int sizeWindow)
{
ENTER_RELPFUNC;
Expand All @@ -186,7 +186,7 @@ relpCltSetWindowSize(relpClt_t *const pThis, int sizeWindow)
}

/** Set the timeout value for this client. */
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetTimeout(relpClt_t *const pThis, unsigned timeout)
{
ENTER_RELPFUNC;
Expand All @@ -196,7 +196,7 @@ relpCltSetTimeout(relpClt_t *const pThis, unsigned timeout)
}

/** Set the timeout value for this client socket connection. */
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetConnTimeout(relpClt_t *const pThis, int connTimeout)
{
ENTER_RELPFUNC;
Expand All @@ -213,7 +213,7 @@ relpCltSetConnTimeout(relpClt_t *const pThis, int connTimeout)

/** Set the local IP address to be used when acting as a client.
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetClientIP(relpClt_t *const pThis, unsigned char *ipAddr)
{
ENTER_RELPFUNC;
Expand All @@ -224,7 +224,7 @@ relpCltSetClientIP(relpClt_t *const pThis, unsigned char *ipAddr)
LEAVE_RELPFUNC;
}

relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltAddPermittedPeer(relpClt_t *const pThis, char *peer)
{
char **newName;
Expand All @@ -248,7 +248,7 @@ relpCltAddPermittedPeer(relpClt_t *const pThis, char *peer)
LEAVE_RELPFUNC;
}

relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetUsrPtr(relpClt_t *const pThis, void *pUsr)
{
ENTER_RELPFUNC;
Expand All @@ -258,7 +258,7 @@ relpCltSetUsrPtr(relpClt_t *const pThis, void *pUsr)
}

/* Note: mode==NULL is valid and means "no change" */
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetAuthMode(relpClt_t *const pThis, char *mode)
{
ENTER_RELPFUNC;
Expand All @@ -282,7 +282,7 @@ relpCltSetAuthMode(relpClt_t *const pThis, char *mode)
/* set the GnuTLS priority string. Providing NULL does re-set
* any previously set string. -- rgerhards, 2013-06-12
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetGnuTLSPriString(relpClt_t *const pThis, char *pristr)
{
ENTER_RELPFUNC;
Expand All @@ -297,7 +297,7 @@ relpCltSetGnuTLSPriString(relpClt_t *const pThis, char *pristr)
finalize_it:
LEAVE_RELPFUNC;
}
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetCACert(relpClt_t *const pThis, char *file)
{
ENTER_RELPFUNC;
Expand All @@ -312,7 +312,7 @@ relpCltSetCACert(relpClt_t *const pThis, char *file)
finalize_it:
LEAVE_RELPFUNC;
}
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetOwnCert(relpClt_t *const pThis, char *file)
{
ENTER_RELPFUNC;
Expand All @@ -327,7 +327,7 @@ relpCltSetOwnCert(relpClt_t *const pThis, char *file)
finalize_it:
LEAVE_RELPFUNC;
}
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetPrivKey(relpClt_t *const pThis, char *file)
{
ENTER_RELPFUNC;
Expand All @@ -342,7 +342,7 @@ relpCltSetPrivKey(relpClt_t *const pThis, char *file)
finalize_it:
LEAVE_RELPFUNC;
}
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSetTlsConfigCmd(relpClt_t *const pThis, char *cfgcmd)
{
ENTER_RELPFUNC;
Expand All @@ -359,7 +359,7 @@ relpCltSetTlsConfigCmd(relpClt_t *const pThis, char *cfgcmd)

}
/* Enable TLS mode. */
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltEnableTLS(relpClt_t *const pThis)
{
ENTER_RELPFUNC;
Expand All @@ -368,7 +368,7 @@ relpCltEnableTLS(relpClt_t *const pThis)
LEAVE_RELPFUNC;
}

relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltEnableTLSZip(relpClt_t *const pThis)
{
ENTER_RELPFUNC;
Expand All @@ -382,13 +382,13 @@ relpCltEnableTLSZip(relpClt_t *const pThis)
* The function is intentionally void as it must operate in a way that
* does not interfere with normal operations.
*/
void PART_OF_API
PART_OF_API void
relpCltHintBurstBegin(relpClt_t *const pThis)
{
relpTcpHintBurstBegin(pThis->pSess->pTcp);
}
/* this is the counterpart to relpCltHintBurstBegin -- see there for doc */
void PART_OF_API
PART_OF_API void
relpCltHintBurstEnd(relpClt_t *const pThis)
{
relpTcpHintBurstEnd(pThis->pSess->pTcp);
Expand All @@ -399,7 +399,7 @@ relpCltHintBurstEnd(relpClt_t *const pThis)
* must free it if it is no longer needed.
* rgerhards, 2008-03-20
*/
relpRetVal PART_OF_API
PART_OF_API relpRetVal
relpCltSendSyslog(relpClt_t *const pThis, unsigned char *const pMsg, const size_t lenMsg)
{

Expand Down
Loading